wpr_simulation2/models/wpb_home_head_up.model
2023-08-27 16:29:22 +08:00

408 lines
12 KiB
XML

<?xml version="1.0"?>
<robot name="wpb_home_gazebo">
<link name="base_footprint">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.05 0.05 0.001" />
</geometry>
</visual>
</link>
<joint name="base_joint" type="fixed">
<origin xyz="0 0 0" rpy="0 0 0" />
<parent link="base_footprint"/>
<child link="base_link" />
</joint>
<!-- base -->
<link name="base_link">
<visual>
<geometry>
<box size="0.01 0.01 0.001" />
</geometry>
<origin rpy = "0 0 0" xyz = "0 0 0"/>
</visual>
</link>
<!-- body -->
<link name = "body_link">
<visual>
<geometry>
<mesh filename="package://wpr_simulation2/meshes/wpb_home/wpb_home_std.dae" scale="1 1 1"/>
</geometry>
<origin rpy = "1.57 0 1.57" xyz = "-.225 -0.225 0"/>
</visual>
<collision>
<origin xyz="0.001 0 .065" rpy="0 0 0" />
<geometry>
<cylinder length="0.13" radius="0.226"/>
</geometry>
</collision>
<inertial>
<mass value="20"/>
<inertia ixx="4.00538" ixy="0.0" ixz="0.0" iyy="4.00538" iyz="0.0" izz="0.51076"/>
</inertial>
</link>
<joint name = "base_to_body" type = "fixed">
<parent link = "base_link"/>
<child link = "body_link"/>
<origin rpy="0 0 0" xyz="0 0 0"/> <!--pos-->
</joint>
<!-- top of base -->
<link name = "base_top_link">
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.33 0.31 0.01"/>
</geometry>
</collision>
<inertial>
<mass value="0.01"/>
<inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
</inertial>
</link>
<joint name = "body_to_top" type = "fixed">
<parent link = "body_link"/>
<child link = "base_top_link"/>
<origin rpy="0 0 0" xyz="0.01 0 0.2"/> <!--pos-->
</joint>
<!-- back -->
<link name = "body_back_link">
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.03 0.23 1.05"/>
</geometry>
</collision>
<inertial>
<mass value="0.01"/>
<inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
</inertial>
</link>
<joint name = "body_to_back" type = "fixed">
<parent link = "base_top_link"/>
<child link = "body_back_link"/>
<origin rpy="0 0.31 0" xyz="-0.038 0 0.5"/> <!--pos-->
</joint>
<!-- head -->
<link name = "head_link">
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.07 0.28 0.06"/>
</geometry>
</collision>
<inertial>
<mass value="0.01"/>
<inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
</inertial>
</link>
<joint name = "body_to_head" type = "fixed">
<parent link = "base_top_link"/>
<child link = "head_link"/>
<origin rpy="0 0.27 0" xyz="0.155 0 1.17"/> <!--pos-->
</joint>
<!-- front -->
<link name = "front_link">
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<cylinder length="1.1" radius="0.01"/>
</geometry>
</collision>
<inertial>
<mass value="0.01"/>
<inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
</inertial>
</link>
<joint name = "body_to_front" type = "fixed">
<parent link = "base_top_link"/>
<child link = "front_link"/>
<origin rpy="0 0 0" xyz="0.15 0 0.55"/> <!--pos-->
</joint>
<!-- Lidar -->
<link name = "laser">
<visual>
<geometry>
<cylinder length="0.001" radius="0.001"/>
</geometry>
<origin rpy = "0 0 0" xyz = "0 0 0"/>
</visual>
</link>
<joint name="laser_joint" type="fixed">
<origin rpy="0 0 0" xyz="0 0 0.15" /> <!--pos-->
<parent link="base_link" />
<child link="laser" />
</joint>
<!-- Kinect -->
<link name = "kinect2_dock">
<visual>
<geometry>
<!-- <box size=".01 .25 .07"/>-->
<box size="0.001 0.001 0.001"/>
</geometry>
<origin rpy = "0 0 0" xyz = "0 0 0"/>
</visual>
</link>
<joint name="kinect_height" type="fixed">
<parent link="base_link"/>
<child link="kinect2_dock"/>
<origin xyz="0.145 -0.013 1.37" rpy="0 0 0"/>
</joint>
<link name = "kinect2_head_frame">
<visual>
<geometry>
<box size="0.001 0.001 0.001"/>
</geometry>
<origin xyz = "0 0 0" rpy = "0 0 0"/>
</visual>
</link>
<!--kinect_pitch -->
<joint name="kinect_pitch" type="fixed">
<origin xyz="0 0 0" rpy="0 0.1 0" />
<parent link="kinect2_dock" />
<child link="kinect2_head_frame" />
</joint>
<link name = "kinect2_front_frame">
<visual>
<geometry>
<box size="0.001 0.001 0.001"/>
</geometry>
<origin xyz = "0 0 0" rpy = "0 0 0"/>
</visual>
</link>
<joint name="kinect_head" type="fixed">
<origin xyz="0 0 0" rpy=" 0 1.57 0" />
<parent link="kinect2_head_frame" />
<child link="kinect2_front_frame" />
</joint>
<link name = "kinect2_ir_optical_frame">
<visual>
<geometry>
<!-- <box size=".25 .04 .07"/>-->
<box size="0.001 0.001 0.001"/>
</geometry>
<origin xyz = "0 0 0" rpy = "0 0 0"/>
</visual>
</link>
<joint name="kinect_ir_trans" type="fixed">
<origin xyz="0 0 0" rpy="0 0 -1.57" />
<parent link="kinect2_front_frame" />
<child link="kinect2_ir_optical_frame" />
</joint>
<link name = "kinect2_camera_frame">
<visual>
<geometry>
<box size="0.001 0.001 0.001"/>
</geometry>
<origin rpy = "0 0 0" xyz = "0 0 0" />
</visual>
</link>
<joint name="kinect_camra_joint" type="fixed">
<origin xyz="0 0 0" rpy="3.1415926 0 -1.5707963" />
<parent link="kinect2_ir_optical_frame" />
<child link="kinect2_camera_frame" />
</joint>
<link name = "kinect2_rgb_optical_frame">
<visual>
<geometry>
<box size="0.001 0.001 0.001"/>
</geometry>
<origin rpy = "0 0 0" xyz = "0 0 0" />
</visual>
</link>
<joint name="kinect_hd_joint" type="fixed">
<origin xyz="0 0 0" rpy="0 1.5707963 0" />
<parent link="kinect2_camera_frame" />
<child link="kinect2_rgb_optical_frame" />
</joint>
<!-- Gazebo plugin for WPR -->
<gazebo>
<plugin name="base_controller" filename="libwpr_plugin.so">
<publishOdometryTf>true</publishOdometryTf>
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<odometryRate>20.0</odometryRate>
<robotBaseFrame>base_footprint</robotBaseFrame>
</plugin>
</gazebo>
<!-- Gazebo plugin for RpLidar A2 -->
<!-- <gazebo reference="laser">
<sensor type="ray" name="rplidar_sensor">
<pose>0 0 0.06 0 0 0</pose>
<visualize>true</visualize>
<update_rate>10</update_rate>
<ray>
<scan>
<horizontal>
<samples>360</samples>
<resolution>1</resolution>
<min_angle>-3.14159265</min_angle>
<max_angle>3.14159265</max_angle>
</horizontal>
</scan>
<range>
<min>0.24</min>
<max>10.0</max>
<resolution>0.01</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin name="rplidar_ros_controller" filename="libgazebo_ros_laser.so">
<topicName>scan</topicName>
<frameName>laser</frameName>
</plugin>
</sensor>
</gazebo> -->
<!-- Gazebo plugin for Kinect v2 -->
<gazebo reference="kinect2_head_frame">
<sensor type="depth" name="kinect2_depth_sensor" >
<always_on>true</always_on>
<update_rate>10.0</update_rate>
<camera name="kinect2_depth_sensor">
<horizontal_fov>1.221730456</horizontal_fov>
<image>
<width>512</width>
<height>424</height>
<format>B8G8R8</format>
</image>
<clip>
<near>0.5</near>
<far>6.0</far>
</clip>
<noise>
<type>gaussian</type>
<mean>0.1</mean>
<stddev>0.07</stddev>
</noise>
</camera>
<plugin name="kinect2_depth_control" filename="libgazebo_ros_openni_kinect.so">
<cameraName>kinect2/sd</cameraName>
<alwaysOn>true</alwaysOn>
<updateRate>20.0</updateRate>
<imageTopicName>image_ir_rect</imageTopicName>
<depthImageTopicName>image_depth_rect</depthImageTopicName>
<pointCloudTopicName>points</pointCloudTopicName>
<cameraInfoTopicName>depth_camera_info</cameraInfoTopicName>
<frameName>kinect2_ir_optical_frame</frameName>
<pointCloudCutoff>0.5</pointCloudCutoff>
<pointCloudCutoffMax>6.0</pointCloudCutoffMax>
<baseline>0.1</baseline>
<distortionK1>0.0</distortionK1>
<distortionK2>0.0</distortionK2>
<distortionK3>0.0</distortionK3>
<distortionT1>0.0</distortionT1>
<distortionT2>0.0</distortionT2>
</plugin>
</sensor>
</gazebo>
<gazebo reference="kinect2_rgb_optical_frame">
<sensor type="camera" name="kinect2_rgb_sensor">
<always_on>true</always_on>
<update_rate>20.0</update_rate>
<camera name="kinect2_rgb_sensor">
<horizontal_fov>1.221730456</horizontal_fov>
<image>
<width>1920</width>
<height>1080</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.2</near>
<far>10.0</far>
</clip>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.007</stddev>
</noise>
</camera>
<plugin name="kinect2_rgb_controller" filename="libgazebo_ros_camera.so">
<alwaysOn>true</alwaysOn>
<update_rate>20.0</update_rate>
<cameraName>kinect2/hd</cameraName>
<imageTopicName>image_color_rect</imageTopicName>
<cameraInfoTopicName>camera_info</cameraInfoTopicName>
<frameName>kinect2_rgb_optical_frame</frameName>
<baseline>0.1</baseline>
<distortionK1>0.0</distortionK1>
<distortionK2>0.0</distortionK2>
<distortionK3>0.0</distortionK3>
<distortionT1>0.0</distortionT1>
<distortionT2>0.0</distortionT2>
</plugin>
</sensor>
</gazebo>
<gazebo reference="kinect2_head_frame">
<sensor type="camera" name="kinect2_qhd_rgb_sensor">
<always_on>true</always_on>
<update_rate>20.0</update_rate>
<camera name="kinect2_qhd_rgb_sensor">
<horizontal_fov>1.221730456</horizontal_fov>
<image>
<width>960</width>
<height>540</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.2</near>
<far>10.0</far>
</clip>
</camera>
<plugin name="kinect2_qhd_rgb_controller" filename="libgazebo_ros_camera.so">
<alwaysOn>true</alwaysOn>
<update_rate>20.0</update_rate>
<cameraName>kinect2/qhd</cameraName>
<imageTopicName>image_color_rect</imageTopicName>
<cameraInfoTopicName>camera_info</cameraInfoTopicName>
<frameName>kinect2_head_frame</frameName>
<baseline>0.1</baseline>
<distortionK1>0.0</distortionK1>
<distortionK2>0.0</distortionK2>
<distortionK3>0.0</distortionK3>
<distortionT1>0.0</distortionT1>
<distortionT2>0.0</distortionT2>
</plugin>
</sensor>
</gazebo>
<!-- IMU plugin for 'body_link' -->
<gazebo reference="body_link">
<gravity>true</gravity>
<sensor name="imu_sensor" type="imu">
<always_on>true</always_on>
<update_rate>100</update_rate>
<visualize>true</visualize>
<topic>__default_topic__</topic>
<plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin">
<topicName>imu/data</topicName>
<bodyName>body_link</bodyName>
<updateRateHZ>100.0</updateRateHZ>
<gaussianNoise>0.0</gaussianNoise>
<xyzOffset>0 0 0</xyzOffset>
<rpyOffset>0 0 0</rpyOffset>
<frameName>imu_link</frameName>
</plugin>
<pose>0 0 0 0 0 0</pose>
</sensor>
</gazebo>
</robot>