URDF文件的生成和编写(四)

安装join_state_publisher软件包

sudo apt install ros-indigo-joint-state-publisher

安装urdf_tutorial软件包

sudo apt install ros-indigo-urdf-tutorial

检查是否安装某个ROS软件包

rospack list | grep XXX
rospack list | grep urdf tutorial

安装liburdfdom-stools工具,检查urdf文件是否有错误

sudo apt-get install liburdfdom-tools

通过check_urdf来检查urdf文件

rospack find baxter_description
cd ~/baxter_ws/src/baxter_common/baxter_description
check_urdf baxter.urdf

输出

robot name is: baxter
---------- Successfully Parsed XML ---------------
root Link: base has 3 child(ren)
    child(1):  collision_head_link_1
    child(2):  collision_head_link_2
    child(3):  torso
        child(1):  head
            child(1):  dummyhead1
            child(2):  head_camera
            child(3):  screen
                child(1):  display
        child(2):  left_arm_mount
            child(1):  left_upper_shoulder
                child(1):  left_lower_shoulder
                    child(1):  left_upper_elbow
                        child(1):  left_lower_elbow
                            child(1):  left_upper_forearm
                                child(1):  left_arm_itb
                                child(2):  left_lower_forearm
                                    child(1):  left_wrist
                                        child(1):  left_hand
                                            child(1):  left_gripper_base
                                                child(1):  left_gripper
                                            child(2):  left_hand_accelerometer
                                            child(3):  left_hand_camera
                                            child(4):  left_hand_camera_axis
                                            child(5):  left_hand_range
                            child(2):  left_upper_forearm_visual
                    child(2):  left_upper_elbow_visual
        child(3):  left_torso_itb
        child(4):  pedestal
        child(5):  right_arm_mount
            child(1):  right_upper_shoulder
                child(1):  right_lower_shoulder
                    child(1):  right_upper_elbow
                        child(1):  right_lower_elbow
                            child(1):  right_upper_forearm
                                child(1):  right_arm_itb
                                child(2):  right_lower_forearm
                                    child(1):  right_wrist
                                        child(1):  right_hand
                                            child(1):  right_gripper_base
                                                child(1):  right_gripper
                                            child(2):  right_hand_accelerometer
                                            child(3):  right_hand_camera
                                            child(4):  right_hand_camera_axis
                                            child(5):  right_hand_range
                            child(2):  right_upper_forearm_visual
                    child(2):  right_upper_elbow_visual
        child(6):  right_torso_itb
        child(7):  sonar_ring

调用urdf_to_graphiz源码生成gv和pdf格式文件

 urdf_to_graphiz baxter.urdf

生成png格式

dot baxter.gv -Tpng -o baxter.png
eog baxter.png
evince baxter.pdf

MeshLab安装

sudo apt-get install meshlab

URDF文件构建中坐标系

你可能感兴趣的:(urdf,ROS,ubuntu)