Files
Geonhee 055d97661e Implement cam in GAZEBO (#90)
* Create urdf file

* add the urdf file for implementing camera

* create launch file for executing gazebo including cam

* remove the dummy

* remove dummy

* change directory
2019-08-10 16:55:18 +09:00

78 lines
2.8 KiB
XML

<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="camera">
<xacro:property name="pi" value="3.1415926535897931"/>
<xacro:macro name="camera_sensor" params="xyz rpy parent">
<joint name="camera_sensor_joint" type="fixed">
<axis xyz="0 1 0" />
<origin xyz="${xyz}" rpy="${rpy}"/>
<parent link="${parent}"/>
<child link="camera_link"/>
</joint>
<link name="camera_link">
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.02 0.08 0.05"/>
</geometry>
</collision>
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.02 0.08 0.05"/>
</geometry>
<material name="iRobot/Green"/>
</visual>
<inertial>
<mass value="0.0001" />
<origin xyz="0 0 0" rpy="0 0 ${pi}"/>
<inertia ixx="0.0000001" ixy="0" ixz="0" iyy="0.0000001" iyz="0" izz="0.0000001" />
</inertial>
</link>
<gazebo reference="camera_link">
<sensor type="camera" name="camera">
<update_rate>30.0</update_rate>
<camera name="head">
<horizontal_fov>1.3962634</horizontal_fov>
<image>
<width>800</width>
<height>600</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.02</near>
<far>300</far>
</clip>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.007</stddev>
</noise>
</camera>
<plugin name="camera_controller" filename="libgazebo_ros_camera.so">
<alwaysOn>true</alwaysOn>
<updateRate>0.0</updateRate>
<cameraName>camera</cameraName>
<imageTopicName>image_raw</imageTopicName>
<cameraInfoTopicName>camera_info</cameraInfoTopicName>
<frameName>camera_link</frameName>
<hackBaseline>0.07</hackBaseline>
<distortionK1>0.0</distortionK1>
<distortionK2>0.0</distortionK2>
<distortionK3>0.0</distortionK3>
<distortionT1>0.0</distortionT1>
<distortionT2>0.0</distortionT2>
</plugin>
</sensor>
</gazebo>
</xacro:macro>
</robot>