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

joint_state_publisher won't move Rviz robot model

asked 2020-06-16 20:51:50 -0500

20sffactory gravatar image

updated 2020-06-17 02:46:22 -0500

gvdhoorn gravatar image

Hello, I'm a total beginner in ROS. I have written a basic URDF of 2 links and 1 joint and try to simulate on Rviz.

After running roslaunch robot_description rviz.launch, rviz appears as usual with joint state publisher window, after adding Robot Model, when I change the value on joint state publisher, the joint link won't move.

May I know what I have done wrong? Thank you.

Code Here:

<?xml version="1.0"?>
<robot name="robot">

  <material name = "blue">
    <color rgba="0 0 0.8 1"/>
  </material>

  <material name = "white">
    <color rgba="1 1 1 1"/>
  </material>

  <link name="base">
    <visual>
      <geometry>
        <cylinder length="0.055" radius="0.055"/>
      </geometry>
      <material name="blue"/>
    </visual>
  </link>

  <link name="body">
    <visual>
      <geometry>
        <box size="0.06 0.06 0.084"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <material name="white"/>
    </visual>
  </link>

  <joint name="base_body" type="continuous">
    <parent link="base"/>
    <child link="body"/>
    <axis xyz="0 0 1"/>
    <origin xyz="0 0 0"/>
  </joint>

</robot>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-06-16 21:16:17 -0500

20sffactory gravatar image

I've found out my error, I fixed my frame at "body", so as I move joint_state_publisher, it's actually moving the base, the movement is not visible because it is a cylinder.

Thank you for reading this.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-06-16 20:51:50 -0500

Seen: 428 times

Last updated: Jun 17 '20