UNPKG

@foxglove/ros1

Version:

Standalone TypeScript implementation of the ROS 1 (Robot Operating System) protocol with a pluggable transport layer

17 lines 733 B
#!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const nodejs_1 = require("@foxglove/xmlrpc/nodejs"); const platform_1 = require("./platform"); const RosMaster_1 = require("../RosMaster"); const RosNode_1 = require("../RosNode"); async function main() { const hostname = RosNode_1.RosNode.GetRosHostname(platform_1.getEnvVar, platform_1.getHostname, platform_1.getNetworkInterfaces); const port = 11311; const httpServer = new nodejs_1.HttpServerNodejs(); const rosMaster = new RosMaster_1.RosMaster(httpServer); await rosMaster.start(hostname, port); console.log(`ROS_MASTER_URI=http://${hostname}:${port}/`); } void main(); //# sourceMappingURL=roscore.js.map