0
$\begingroup$

Rosanswers logo

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>

Originally posted by 20sffactory on ROS Answers with karma: 26 on 2020-06-16

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by 20sffactory with karma: 26 on 2020-06-16

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.