0
$\begingroup$

Rosanswers logo

I am trying to get the urg_node to publish scans to the default topic (laser) and the default frame_id (laser). It all works fine when I couple the commands: rosrun urg_node urg_node _ip_address:="192.168.0.10" _ip_port:-"10940" and rosrun tf static_transform_publisher 0 0 0 0 0 0 map laser 40 in two terminals.

But my original intention is to be able to publish it on the laser topic and have the map to laser transform as NOT static. But this means that the transform now has an additional requirement that they their time stamps should be synchronized. But they are not! The laser messages are being published with the time stamp on a scale of 1454425297 seconds as opposed to the rest of the nodes (including the ones publishing the other transforms) which are on a scale of just a few 100 seconds (corresponding to the time passed since I started the roscore).

I would also like to note that I am using gazebo to publish these other transforms.

My question is:
Obviously these time stamps have to match up and there are only two obvious approaches:

  1. Somehow get the lidar to publish laser messages with the timestamp of the gazebo nodes.
  2. Have all other nodes publish messages with the timestamp of the LIDAR.

Unfortunately, I am unable to do either.

Things I tried:

  • rosrun urg_node urg_node _ip_address:="192.168.0.10" _ip_port:-"10940" calibrate_time:="true"
  • rosrun urg_node urg_node _ip_address:="192.168.0.10" _ip_port:-"10940" time_offset:-"-1454425297.0"
  • `

`


Originally posted by Reuben John on ROS Answers with karma: 21 on 2016-02-02

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Pretty sure you accidentally set "use_sim_time" to true on the parameter server. Once this parameter is set, all ROS nodes started listen to the /clock topic for time. Make sure to kill your roscore, start up everything and then run

rosparam get use_sim_time

If it returns "true" you have some launch file that sets sim time to true, causing the observed problems.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2016-02-02

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Reuben John on 2016-02-03:
Your right! rosparam get use_sim_time returns true! But even after tutorial command: roslaunch gazebo_ros empty_world.launch paused:=true use_sim_time:=false gui:=true throttled:=false headless:=false debug:=true, it shows true. rosparam set /use_sim_time false works but maybe the bad approach

Comment by Stefan Kohlbrecher on 2016-02-03:
Mixing simulation and real hardware drivers can be tricky, as the former uses sim time per default and the latter might expect to not run sim time. Maybe things work better when switching off the time sync for the urg_node (in case it's been true before).

$\endgroup$

Your Answer

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