How to solve the conflict among "/joint_states",urdf and tf's transform
Hi, all! My question are from this question published before. You don't need to read that question. Because I have found that this maybe totally because multiple postion values in the message /joint_states which is published by jointstatepublisher and received by robotstatepublisher.
In a word, we are constructing a 3D scanning hardware system, in which a dynamixel motor rotates a Hokuyo scanner to obtain a 3D map. We use urdf and package robotstatepublisher to construct the tf tree as this tutorial says. But from the display of 3D models and the tf tree, the revolute joint where the motor rotates the scanner couldn't work normally.
As this question said, we found that the frameid "HN07N101" ( the revolute joint on the Dynamixel motor) which rotates around its own blue "Z" axis couldn't be displayed normally.
From the displayed tf tree in rviz, It seems that the frame "HN07N101" couldn't roate smoothly. We check the topic "/jointstates" as follows:
hodor@hodor:~$ rostopic echo /joint_states | grep position
position: [0.0]
position: [0.22242721424341796]
position: [0.0]
position: [-0.09050486648525283]
position: [0.0]
position: [-0.40803888957758055]
...
position: [0.0]
position: [-1.5677283652191252]
position: [0.0]
It seems that there is conflict between the message published by jointstatepublisher( zero value) and the message published by our project. This conflict leads two different position value in the topic "/jointstates" which possible causes the unsmooth rotation of frame "HN07N101".
My launch file is :
<?xml version="1.0"?>
<launch>
<param name="robot_description" textfile="$(find ins_threedscan_description)/urdf/Work.urdf" />
<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 name="rviz" pkg="rviz" type="rviz" args="-d $(find ins_threedscan_description)/rviz_cfg/work.rviz" />
<node pkg="loam_back_and_forth" type="scantoCloud_bf" name="scantoCloud_bf" output="screen" launch-prefix = "$(arg launch_prefix)"/>
</launch>
Does anybody know how to solve this confict? Best Regards!
Thank you!
Asked by scopus on 2016-11-29 23:14:41 UTC
Answers
Does anybody know how to solve this confict? Best Regards!
yes: you don't need a joint_state_publisher
instance if you have some other node in your system that already publishes JointState
messages (in this case for your Dynamixel joints).
See how to publish real robot-arm joint_states by ROS for a related question and some more explanation.
Asked by gvdhoorn on 2016-11-30 06:33:25 UTC
Comments