dd_robot2.urdf help
Hi I am reading "ROS ROBOTICS BY EXAMPLE SECOND EDITION " and I am stuck in chapter 2 , when it introduces the dd_robot2.urdf. What I am getting is the image blow
but the book has this instead:
I followed the book step by step and I cant figure out where I went wrong. Any help? Thank you!
EDIT1:
EDIT 2:
Launch File:
<launch>
<!-- values passed by command line input -->
<arg name="model" />
<arg name="gui" default="False" />
<!-- set these parameters on Parameter Server -->
<param name="robot_description" textfile="$(find ros_robotics)/urdf/$(arg model)" />
<param name="use_gui" value="$(arg gui)"/>
<!-- Start 3 nodes: joint_state_publisher, robot_state_publisher and rviz -->
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find ros_robotics)/urdf.rviz" required="true" />
<!-- (required = "true") if rviz dies, entire roslaunch will be killed -->
</launch>
URDF File:
<?xml version='1.0'?>
<robot name="dd_robot">
<!-- Base Link -->
<link name="base_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.5 0.5 0.25"/>
</geometry>
</visual>
</link>
<!-- Right Wheel -->
<link name="right_wheel">
<visual>
<origin xyz="0 0 0" rpy="1.570795 0 0" />
<geometry>
<cylinder length="0.1" radius="0.2" />
</geometry>
</visual>
</link>
<joint name="joint_right_wheel" type="continuous">
<parent link="base_link"/>
<child link="right_wheel"/>
<origin xyz="0 -0.30 0" rpy="0 0 0" />
<axis xyz="0 1 0" />
</joint>
<!-- Left Wheel -->
<link name="left_wheel">
<visual>
<origin xyz="0 0 0" rpy="1.570795 0 0" />
<geometry>
<cylinder length="0.1" radius="0.2" />
</geometry>
</visual>
</link>
<joint name="joint_left_wheel" type="continuous">
<parent link="base_link"/>
<child link="left_wheel"/>
<origin xyz="0 0.30 0" rpy="0 0 0" />
<axis xyz="0 1 0" />
</joint>
</robot>
Command on terminal:
$ roslaunch ros_robotics ddrobot_rviz.launch model:=dd_robot2.urdf
Edit3:
RViz says that there's a tf problem. Can you update your question with a screen shot of your tf tree?
It has been updated in Edit1 screenshot
That's a screen shot of RViz. I'm asking for your tf tree
When I use your launch file (removing references to your
ros_robotics
package) everything loads fine and I can visualize the model just as in the book.strange my doesnt load up like that. Let me screen shot my TF tree.
How do i run the TF Tree?
It's in the tutorial I linked to in an earlier comment
I updated it with screenshot seems not work when i used
rosrun tf view_frames