ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

klimperdirndl's profile - activity

2022-10-25 10:01:42 -0500 received badge  Nice Question (source)
2017-10-23 02:34:07 -0500 received badge  Student (source)
2017-04-19 10:08:14 -0500 received badge  Famous Question (source)
2017-03-26 13:51:09 -0500 received badge  Notable Question (source)
2016-12-21 17:36:22 -0500 received badge  Popular Question (source)
2016-11-18 06:05:42 -0500 commented question roslaunch api - start/stop nodes on a remote machine

Yes I would like to dynamically launch and remap nodes from my tool (all python).

2016-11-18 05:42:32 -0500 asked a question roslaunch api - start/stop nodes on a remote machine

I am trying to write a python script using the roslaunch python API found on http://docs.ros.org.ros.informatik.un... . If I run this code on machine2 it always starts the node local on machine2 even though I specified machine1. Everything works well when I do the same thing within a launch file specifying the machine1 in a machine tag.

What am I missing out? Has anybody ever used the roslaunch API for launching nodes remote?

master = roslaunch.core.Master(type_='rosmaster', uri='http://192.168.139.200:11311')

uuid = roslaunch.rlutil.get_or_generate_uuid(None, False)
roslaunch.configure_logging(uuid)
name = 'image_view_abc'
package = 'image_view'
type = 'image_view'

machine_1 = roslaunch.core.Machine(name='machine1', address='http://192.168.139.200', env_loader='/opt/ros/indigo/env.sh', user='account')

node = roslaunch.core.Node(name=name, package=package, node_type=type, machine_name='machine1')
node.machine = machine_1

launch = roslaunch.scriptapi.ROSLaunch()
launch.start()
process = launch.launch(node)