首页 > 应用开发 > XML/XSL > 为 URDF 文件添加 Gazebo 标签
粘贴到 g1_29dof.urdf 文件末尾(在最后一行的 标签之前)
< material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "left_hip_pitch_link"> < material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "left_ankle_roll_link"> < material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "right_hip_pitch_link"> < material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "right_ankle_roll_link"> < material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "logo_link"> < material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "head_link"> < material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "pelvis_contour_link"> < material> Gazebo/Grey </ material> </ gazebo>qzsxy.com < gazebo reference= "left_hip_roll_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_hip_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo>njyf.com.cn < gazebo reference= "left_knee_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_ankle_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo>yousLab.com < gazebo reference= "right_hip_roll_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_hip_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_knee_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_ankle_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo>xyzdh.cn < gazebo reference= "waist_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "waist_roll_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "torso_link"> < material> Gazebo/Grey </ material>wap.sdcnjx.cn </ gazebo>winered.cn < gazebo reference= "waist_support_link"> < material> Gazebo/Grey </ material> </ gazebo>wsbbt.com < gazebo reference= "left_shoulder_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_shoulder_roll_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_shoulder_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo> pant.com.cn < gazebo reference= "left_elbow_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_wrist_roll_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_wrist_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_wrist_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo>88363.cn < gazebo reference= "left_rubber_hand"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_shoulder_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo>suishougou.cn, < gazebo reference= "right_shoulder_roll_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_shoulder_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_elbow_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_wrist_roll_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_wrist_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_wrist_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo>xyxdLsm.com,
< name> g1_description </ name> < version> 0.0.1 </ version> < description> The g1_description package </ description> < maintainer email= "user@todo.todo"> User </ maintainer> < license> TODO </ license> < buildtool_depend> catkin </ buildtool_depend> < depend> roscpp </ depend> < depend> rospy </ depend> < depend> std_msgs </ depend> < depend> urdf </ depend> < depend> xacro </ depend> < exec_depend> gazebo_ros </ exec_depend> < exec_depend> joint_state_publisher </ exec_depend> < exec_depend> robot_state_publisher </ exec_depend> < exec_depend> rviz </ exec_depend>529529.cn < export> < gazebo_ros gazebo_model_path= "${prefix}/.."/> </ export> </ package>
<param name= "robot_description" textfile= " $(find g1_description)/urdf/g1_29dof.urdf" /> <node name= "joint_state_publisher_gui" pkg= "joint_state_publisher_gui" type = "joint_state_publisher_gui" /> <node name= "robot_state_publisher" pkg= "robot_state_publisher" type = "robot_state_publisher" /> <node name= "rviz" pkg= "rviz" type = "rviz" args= "-d $(find g1_description)/launch/g1.rviz" /> </launch>
launch> < include file= "$(find gazebo_ros)/launch/empty_world.launch"> < arg name= "paused" value= "true"/> < arg name= "use_sim_time" value= "true"/> < arg name= "gui" value= "true"/> </ include> < param name= "robot_description" textfile= "$(find g1_description)/urdf/g1_29dof.urdf" /> < node name= "spawn_urdf" pkg= "gazebo_ros" type= "spawn_model" args= "-file $(find g1_description)/urdf/g1_29dof.urdf -urdf -z 0.79 -model g1_robot" output= "screen" /> < node name= "robot_state_publisher" pkg= "robot_state_publisher" type= "robot_state_publisher" />
</ gazebo> < gazebo reference= "left_hip_pitch_link"> < material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "left_ankle_roll_link"> < material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "right_hip_pitch_link"> < material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "right_ankle_roll_link"> < material> Gazebo/DarkGrey </ material> </ gazebo>LeLeypay.cn < gazebo reference= "logo_link"> < material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "head_link"> < material> Gazebo/DarkGrey </ material> </ gazebo> < gazebo reference= "pelvis_contour_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_hip_roll_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_hip_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_knee_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_ankle_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_hip_roll_link"> < material> Gazebo/Grey </ material> </ gazebo>jtwL.com.cn < gazebo reference= "right_hip_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_knee_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_ankle_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "waist_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "waist_roll_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "torso_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "waist_support_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_shoulder_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_shoulder_roll_link"> < material> Gazebo/Grey </ material> </ gazebo>xyxdLsm.com < gazebo reference= "left_shoulder_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_elbow_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_wrist_roll_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_wrist_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_wrist_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "left_rubber_hand"> < material> Gazebo/Grey </ material> </ gazebo>psnsd.com < gazebo reference= "right_shoulder_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_shoulder_roll_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_shoulder_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_elbow_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_wrist_roll_link"> < material> Gazebo/Grey </ material> </ gazebo>zjtgjx.net < gazebo reference= "right_wrist_pitch_link"> < material> Gazebo/Grey </ material> </ gazebo> < gazebo reference= "right_wrist_yaw_link"> < material> Gazebo/Grey </ material> </ gazebo>bakmk.com < gazebo reference= "right_rubber_hand"> < material> Gazebo/Grey </ material>
< name> g1_description </ name> < version> 0.0.1 </ version> < description> The g1_description package </ description> < maintainer email= "user@todo.todo"> User </ maintainer> < license> TODO </ license> < buildtool_depend> catkin </ buildtool_depend> < depend> roscpp </ depend> < depend> rospy </ depend> < depend> std_msgs </ depend> < depend> urdf </ depend> < depend> xacro </ depend> < exec_depend> gazebo_ros </ exec_depend> < exec_depend> joint_state_publisher </ exec_depend> < exec_depend> robot_state_publisher </ exec_depend> < exec_depend> rviz </ exec_depend> < export> < gazebo_ros gazebo_model_path= "${prefix}/.."/> </ export> accfj.cn
cmake_minimum_required (VERSION 3.0 . 2 ) project (g1_description) find_package (catkin REQUIRED COMPONENTS urdf xacro ) catkin_package () # 安装路径设置,确保launch和meshes能被找到
launch> < include file= "$(find gazebo_ros)/launch/empty_world.launch"> < arg name= "paused" value= "true"/> < arg name= "use_sim_time" value= "true"/> < arg name= "gui" value= "true"/> </ include> < param name= "robot_description" textfile= "$(find g1_description)/urdf/g1_29dof.urdf" /> < node name= "spawn_urdf" pkg= "gazebo_ros" qyae.cn, type= "spawn_model" args= "-file $(find g1_description)/urdf/g1_29dof.urdf -urdf -z 0.79 -model g1_robot" output= "screen" /> < node name= "robot_state_publisher" pkg= "robot_state_publisher" type= "robot_state_publisher" />
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70048956/viewspace-3109300/ ,如需转载,请注明出处,否则将追究法律责任。