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

Broken tf tree

asked 2012-12-20 04:05:33 -0600

ChengXiang gravatar image

updated 2012-12-20 18:19:55 -0600

Hi, I encountered a problem while adding a continuous joint between 2 links, the base_scan_link and the trial_camera_link. The tf transformation between the 2 links works when the joint type is "fixed", but when I changed it to "continuous" or "revolute", the tf transformation broke down (see the /trial_camera_link -> /trial_optical_frame).

image description

However, when I check my urdf using the command line tool "check_urdf", it shows that the links are joined.

chengxiang@ubuntu:~$ rosrun urdf check_urdf /tmp/erratic.urdfrobot name is: 
erratic
---------- Successfully Parsed XML ---------------
root Link: base_footprint has 1 child(ren)
    child(1):  base_link
        child(1):  base_caster_support_link
            child(1):  caster_wheel_link
        child(2):  base_link_left_wheel_link
        child(3):  base_link_right_wheel_link
        child(4):  computer_link
        child(5):  laser_base_link
            child(1):  base_scan_link
                child(1):  trial_camera_link
                    child(1):  trial_optical_frame

This is the joint tag, did I miss something?

<joint name="camera_joint" type="continuous">
      <origin xyz="0 0 0" rpy="0 0 0" />
      <axis xyz="0 1 0"/>
      <parent link="base_scan_link" />
      <child link="trial_camera_link"/>

      </joint>

Can anyone point out what is my mistake? Thank you.

Updates: This is the msg I get after running rostopic echo on /joint_states

header: 
  seq: 1685
  stamp: 
  secs: 16
nsecs: 881000000
  frame_id: ''
name: ['base_caster_support_joint', 'caster_wheel_joint',  
'base_link_left_wheel_joint', 'base_link_right_wheel_joint']
position: [-0.014502582708889378, -0.6869539514585625, -0.00398788157537755, 
-0.007454428248815148]
velocity: [0.051682059495132174, -0.009866431261450204, 0.0022585278517509577, 
-0.004541821383680124]
effort: [0.0, 0.0, 0.0, 0.0]
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2012-12-20 04:17:16 -0600

dornhege gravatar image

I suspect that you might not have any senders that supply /joint_states for this link. For a joint that is not fixed to have some valid transformation, someone needs to supply the current angle of that joint.

edit flag offensive delete link more

Comments

Hi. The gazebo is sending out the /joint_states msg. But it seems that the joint I defined is not included in the name.

ChengXiang gravatar image ChengXiang  ( 2012-12-20 18:17:26 -0600 )edit
3

answered 2012-12-20 19:19:35 -0600

ChengXiang gravatar image

Hi people. After some trial and error, I found out that this issue can be overcome by adding a transmission element for the joint. Thanks for all your help.

edit flag offensive delete link more

Comments

I'm in a similar situation, with the exception that I do not want any transmission on this joint. It's like a train car that follows the motion generated by the locomotive. The motion I need to simulate is perfect inside Gazebo, but I'm missing this non-fixed non-transmissioned transforms.

mescarra gravatar image mescarra  ( 2018-07-30 12:24:54 -0600 )edit
1

answered 2012-12-20 04:15:44 -0600

Lorenz gravatar image

Do you have a joint state publisher and the robot_state_publisher node running? For non-fixed joints, it expects the current position of these joints on the /joint_states topic to compute the correct tf transform.

edit flag offensive delete link more

Comments

Hi Lorenz. The joint state publisher is gazebo ( through the gazebo_ros_controller_manager_plugin) and the robot_state-publisher node is running and subscribing to the /joint_states topic.

ChengXiang gravatar image ChengXiang  ( 2012-12-20 18:16:13 -0600 )edit

The joint in question is not connected to any actuator, so I do not need to add a <transmission> element right?

ChengXiang gravatar image ChengXiang  ( 2012-12-20 18:54:22 -0600 )edit

Question Tools

Stats

Asked: 2012-12-20 04:05:33 -0600

Seen: 1,871 times

Last updated: Dec 20 '12