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

no timestamps when publishing for fixed joints robot_state_publisher

asked 2019-10-21 09:06:17 -0600

chillbird gravatar image

updated 2019-10-25 03:23:20 -0600

Hi guys,

I have the following problem: I wrote a launch file which launches my differential drive robot with 2 lidar sensors in gazebo and rviz. The odometry for my robot comes from the differential drive plugin and the transforms for my robot come from the nodes "robot_sate_publisher" and "joint_state_publisher". I have 3 fixed joints "base_link" to "chassis" and "chassis" to each of the lidars and 2 continuous joints "chassis" to "wheel" for each wheel. Now when I look at the rqt_tree I see that the transforms for all the fixed joints, there is no time_stamp for the transforms and also I cannot choose to see the Pointcloud data in the odom frame since rviz tells me that the message was removed, because it is too old.

My question: do I have to code now a separate node which broadcasts all these transforms with a time stamp? I thought that the robot_state_publisher and joint_state_publisher nodes that I launch in the launch-file are exactly for that: to publish all the transforms (whole transform tree) of my robot. But I only get stamped messages for the chassis to wheel tranforms and odom to base_footprint transforms but not for the fixed joints. (I already tried with static_transform nodes to publish static transforms, but still no timestamp)

Launch File:

<launch>

  <!--Robot Description from URDF-->
  <param name="robot_description" command="$(find xacro)/xacro $(find sim_1)/urdf/robot.xacro"/>  

  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>

  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/>

  <!--node pkg="tf" type="static_transform_publisher" name="to_chassis" args="0 0 0.35 0 0 0 /base_footprint /chassis 50"/>

  <node pkg="tf" type="static_transform_publisher" name="to_laser_back" args="-0.45 -1 1.25 0 0 0 /chassis /sensor_laser_back  50"/>

  <node pkg="tf" type="static_transform_publisher" name="to_laser_front" args="0.45 1 1.25 0 0 0 /chassis /sensor_laser_front  50"/-->

  <!--RViz-->
  <node name="rviz" pkg="rviz" type="rviz" required="true"/>

  <!--Gazebo empty world launch file-->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="debug" value="false" />
        <arg name="gui" value="true" />
        <arg name="paused" value="false"/>
        <arg name="use_sim_time" value="false"/>
        <arg name="headless" value="false"/>
        <arg name="verbose" value="true"/>
  </include>

  <!--Gazebo Simulator-->
  <node name="spawn_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model robot" output="screen"/>

</launch>

Thank you very much in advance!image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-10-25 03:14:50 -0600

chillbird gravatar image

updated 2019-10-25 03:20:25 -0600

gvdhoorn gravatar image

so it seems to be normal to not get any timestamps when publishing fixed joint transforms via robot_state_publisher as can be seen in tf_tree here (sorry cannot upload image due to karma) and this issue also describes my original issue: #q307852.

But I wrongfully thought it has something to do with the transforms not being timestamped or are too old as indicated by rviz error message.

edit flag offensive delete link more

Comments

I've just given you sufficient karma to attach your screenshot. Please do.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-25 03:20:01 -0600 )edit

cool, thank you!

chillbird gravatar image chillbird  ( 2019-10-25 03:23:34 -0600 )edit

I'm facing the same problem regarding timestamps from fixed transforms. Were you able to solve it? @chillbird

felipeduque gravatar image felipeduque  ( 2019-11-29 07:58:17 -0600 )edit

yes, set use_sim_time to true in your launch file when launching gazebo and it should solve your problem.

<arg name="use_sim_time" value="true"/>
chillbird gravatar image chillbird  ( 2019-12-11 11:39:34 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2019-10-21 09:06:17 -0600

Seen: 817 times

Last updated: Oct 25 '19