0
$\begingroup$

Rosanswers logo

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!!!


Originally posted by Anas Alhashimi on ROS Answers with karma: 179 on 2014-12-30

Post score: 1


Original comments

Comment by Tom Moore on 2014-12-30:
Can you post the launch file?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2015-01-07

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Anas Alhashimi on 2015-01-08:
Thanks That fixes every thing :) I think this comment should be written with the rosbag play commandline details.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.