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

Roslaunch error: Bad argument __name:=

asked 2012-11-14 22:45:43 -0600

Jep gravatar image

Hi there,

I have a ros node that runs without problem when it's called by rosrun, but dies without reason when called by a roslaunch:

NODES
  /
    CalibrateInt (tracking/calibrateInt)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[CalibrateInt-1]: started with pid [27132]
ERROR: 
  Bad argument __name:=CalibrateInt

[CalibrateInt-1] process has died [pid 27132, exit code 255, cmd /home/guillem/ros_workspace/Armed-turtlebot/tracking/bin/calibrateInt __name:=CalibrateInt __log:=/home/guillem/.ros/log/7c0acfb0-2f0e-11e2-948f-446d5719810b/CalibrateInt-1.log].
log file: /home/guillem/.ros/log/7c0acfb0-2f0e-11e2-948f-446d5719810b/CalibrateInt-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

launchfile:

<launch>
     <node pkg="tracking" type="calibrateInt" name="CalibrateInt"/>
</launch>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2012-11-14 22:52:49 -0600

Lorenz gravatar image

I guess your node is using command line parameters but it is not ignoring additional, ros specific parameters.

While rosrun really just calls a binary and only passes the parameters you explicitly specify, roslaunch always adds the parameter __name to set the node name and maybe a few more. Topic remappings are also implemented using command line parameters. Make sure your node also accepts ros specific parameters or avoid command line parameters at all. Using the parameter server is a much better choice in most cases.

edit flag offensive delete link more

Comments

1

Which is why usually all arguments are passed to ROS when Initializing the roscpp Node

felix k gravatar image felix k  ( 2012-11-15 01:24:57 -0600 )edit

Thanks! you were right. I'm using ROS parameters now instead.

Jep gravatar image Jep  ( 2012-11-16 01:37:39 -0600 )edit
1

Great. But please read http://ros.org/wiki/Support Do not create answers for discussion, updates or comments. Instead, please either use the comment functionality or edit your original post.

Lorenz gravatar image Lorenz  ( 2012-11-16 01:39:16 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2012-11-14 22:45:43 -0600

Seen: 2,010 times

Last updated: Nov 16 '12