Ask Your Question
1

topic_tools transform from launch file?

asked 2015-07-21 23:41:55 -0500

lucasw gravatar image

updated 2015-07-22 07:30:35 -0500

Is topic_tools transform incapable of being run from a launch file? Maybe it has a non-standard parser for getting the python imports, and can't handle __ arguments properly?

<?xml version="1.0"?>
<launch>
  <node name="radius" pkg="rostopic" type="rostopic"
      args="pub /radius std_msgs/Float32 'data: 1.0' -r 1" />

  <node name="radius_to_diameter" pkg="topic_tools" type="transform"
      args="/radius /diameter std_msgs/Float32 'm.data * 2'" />
</launch>

Fails with:

process[radius-1]: started with pid [26144]
process[radius_to_diameter-2]: started with pid [26150]
usage: transform [-h] [-i MODULES [MODULES ...]]
                 input output_topic output_type expression
transform: error: unrecognized arguments: __name:=radius_to_diameter __log:=/home/lucasw/.ros/log/.../radius_to_diameter-2.log
[radius_to_diameter-2] process has died [pid 26150, exit code 2, cmd /opt/ros/indigo/lib/topic_tools/transform /radius /diameter std_msgs/Float32 m.data * 2 __name:=radius_to_diameter __log:=/home/lucasw/.ros/log/.../radius_to_diameter-2.log].

While

rosrun topic_tools transform /radius /diameter std_msgs/Float32 'm.data * 2'

works as expected.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-22 12:01:03 -0500

It looks it's missing a call to rospy.myargv to strip all the extra stuff before trying to parse the args. File an issue against ros_comm (or better yet, a pull request).

edit flag offensive delete link more

Comments

I'll do that.

lucasw gravatar imagelucasw ( 2015-07-22 12:39:42 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-07-21 23:41:55 -0500

Seen: 1,498 times

Last updated: Jul 22 '15