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

nodes not working in launch file

asked 2014-12-30 06:40:34 -0500

updated 2015-01-07 11:06:07 -0500

Hello guys, I have the problem that some nodes are not working from launch file. Specifically the tf static_transform_publisher and also the rosbag record. I do not get any error but they are not working in the launch file. When i run them in terminal using rosrun they work perfectly!

any solution or suggestion for this problem?

one the launch files is:

<launch>
  <master auto="start"/>
  <param name="/use_sim_time" value="true"/>

  <node name="play" pkg="rosbag" type="play" args="-r 0.99 /home/mypack/vicon3_2014-12-26-17-33-16.bag"/>
  <node pkg="tf" type="static_transform_publisher" 
         name="odom_to_world" args="4.53429770054 2.62724045772 0.568230440739 0.0554815495188 0.998340882582 -0.0146944327274 -0.00462098201913  world laser  100" />

  <node name="vicon2pos" pkg="mypack" type="vicon2pos" args="/Pioneer /Table1" output="screen"/>
  <node name="vicon2pos2" pkg="mypack" type="v2pos" args="/Pioneer /Table1" output="screen"/>
  <!-- Run the rivz -->
  <node name="rviz" pkg="rviz" type="rviz" args="-d /home/mypack/vicon.vcg" />


</launch>

The static_transform_publisher, vicon2pos and v2pos are not working properly in the launch file. Actually, the transform_publisher is not publishing anything and the other two nodes are not even subscribe to topics played in rosbag. Running command lines in terminals, all are working properly!!!

edit retag flag offensive close merge delete

Comments

Can you post the launch file?

Tom Moore gravatar image Tom Moore  ( 2014-12-30 07:29:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-01-07 13:25:38 -0500

gvdhoorn gravatar image

According to this post on ros-users, you have to start rosbag with the --clock argument for use_sim_time to work properly with static_transform_publisher (and probably other nodes as well):

The output of roswtf reported the following:

"ERROR /use_simtime is set but no publisher of /clock is present"

Setting use_simtime to true and playing the bag with the --clock option resolved all issues.

You will probably see the same output if you start your launchfile and then run roswtf.

edit flag offensive delete link more

Comments

Thanks That fixes every thing :) I think this comment should be written with the rosbag play commandline details.

Anas Alhashimi gravatar image Anas Alhashimi  ( 2015-01-08 03:07:23 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2014-12-30 06:40:34 -0500

Seen: 1,379 times

Last updated: Jan 07 '15