camera.xacro 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?xml version="1.0"?>
  2. <robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="camera">
  3. <link name="camera_link">
  4. <inertial>
  5. <mass value="0.001" />
  6. <origin xyz="0 0 0" />
  7. <inertia ixx="0.001" ixy="0.0" ixz="0.0"
  8. iyy="0.001" iyz="0.0"
  9. izz="0.001" />
  10. </inertial>
  11. <visual>
  12. <origin xyz=" 0 0 0 " rpy="1.57 0 1.57" />
  13. <geometry>
  14. <mesh filename="package://racecar_description/meshes/S1030-0315.dae" scale="0.1 0.1 0.1" />
  15. </geometry>
  16. </visual>
  17. <collision>
  18. <origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
  19. <geometry>
  20. <box size="0.03 0.16 0.03" />
  21. </geometry>
  22. </collision>
  23. </link>
  24. <gazebo reference="camera_link">
  25. <material>Gazebo/Black</material>
  26. </gazebo>
  27. <gazebo reference="camera_link">
  28. <sensor type="camera" name="camera_node">
  29. <pose>0 0 0 0 0 0</pose>
  30. <update_rate>30.0</update_rate>
  31. <camera name="head">
  32. <horizontal_fov>1.3962634</horizontal_fov>
  33. <image>
  34. <width>1280</width>
  35. <height>720</height>
  36. <format>R8G8B8</format>
  37. </image>
  38. <clip>
  39. <near>0.02</near>
  40. <far>300</far>
  41. </clip>
  42. <noise>
  43. <type>gaussian</type>
  44. <mean>0.0</mean>
  45. <stddev>0.007</stddev>
  46. </noise>
  47. </camera>
  48. <plugin name="gazebo_camera" filename="libgazebo_ros_camera.so">
  49. <alwaysOn>true</alwaysOn>
  50. <updateRate>0.0</updateRate>
  51. <cameraName>/camera</cameraName>
  52. <imageTopicName>image_raw</imageTopicName>
  53. <cameraInfoTopicName>camera_info</cameraInfoTopicName>
  54. <frameName>camera_link</frameName>
  55. <hackBaseline>0.07</hackBaseline>
  56. <distortionK1>0.0</distortionK1>
  57. <distortionK2>0.0</distortionK2>
  58. <distortionK3>0.0</distortionK3>
  59. <distortionT1>0.0</distortionT1>
  60. <distortionT2>0.0</distortionT2>
  61. </plugin>
  62. </sensor>
  63. </gazebo>
  64. </robot>