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

how to create a .launch file with a node developed with ROSJava

asked 2012-01-07 01:41:08 -0500

I would like to create a .launch file to use the command:

roslaunch robot.launch

But, I don't know how to translate the following shell call into a .launchfile:

rosrun rosjava_bootstrap run.py bumperCar 
org.lejos.ros.nodes.bumpercar.BumperCarControl __name:=BumperCarControl

Any help?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
3

answered 2012-01-07 18:39:33 -0500

ahendrix gravatar image

updated 2012-01-08 06:35:38 -0500

You'll want to add an extra args="" parameter to your <node> tag. For more information, take a look at the XML docs for <node>

EDIT: Try something like:

<node pkg="rosjava_bootstrap" type="run.py" args="bumperCar org.lejos.ros.nodes.bumpercar.BumperCarControl" name="BumperCarControl" />

edit flag offensive delete link more

Comments

I get the message "Can't locate 'run.py' in 'rosjava_bootstrap' ". I can launch it fine when I use ./build/install/bin/test theTest

amittleider gravatar image amittleider  ( 2012-12-17 07:08:39 -0500 )edit
0

answered 2012-01-07 22:44:32 -0500

I was creating some robot.launch but I didn't have success:

<launch>

<node pkg="rosjava_bootstrap" type="run.py" name="rosjava_bootstrap" output="screen" />

<node pkg="bumperCar" type="BumperCarControl" name="BumperCarControl" output="screen" respawn="true">
    <param name="__name" value="BumperCarControl"/>
</node>

</launch>

Can you help me?

If I execute the command:

rosrun rosjava_bootstrap run.py

I receive the following output:

This python script runs rosjava based jars and bootstraps the classpath for the node by looking at its package manifest.

rosrun rosjava_bootstrap run.py <pkg> <node_class> [args ... ]

I suppose that it is necessary in the file robot.launch

edit flag offensive delete link more

Comments

comments should be posted as a comment or an edit to the original question; not as an answer.
ahendrix gravatar image ahendrix  ( 2012-01-08 06:36:25 -0500 )edit
Your example helped me so much. Many thanks.
Juan Antonio Breña Moral gravatar image Juan Antonio Breña Moral  ( 2012-01-10 09:26:05 -0500 )edit

Question Tools

Stats

Asked: 2012-01-07 01:41:08 -0500

Seen: 840 times

Last updated: Jan 08 '12