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

Revision history [back]

click to hide/show revision 1
initial version

The way that I have found to solve this issue is remove the joint_state_publisher from launch file and put it in the xacro file like this:

<gazebo>
    <plugin name="joint_state_publisher" filename="libgazebo_ros_joint_state_publisher.so">
        <robotNamespace>/mm</robotNamespace>
        <jointName>${base_link}__${frame}, 
                   ${frame}__${crank}, 
                   ${crank}__${coupler}, 
                   ${fork}__${wheel}, 
                   ${frame}__${rocker}
        </jointName>
    </plugin>    
</gazebo>

Now the robot's movements in Rviz are the same as in Gazebo and the TF tree is made correctly.