Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add camera option #30

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
294 changes: 0 additions & 294 deletions meshes/dae/body/RasPiMouse_TopPlate.dae

This file was deleted.

1,889 changes: 0 additions & 1,889 deletions meshes/dae/body/RasPiMouse_body-TopPlate-URG.dae

This file was deleted.

1,817 changes: 0 additions & 1,817 deletions meshes/dae/body/RasPiMouse_body-TopPlate.dae

This file was deleted.

1,745 changes: 0 additions & 1,745 deletions meshes/dae/body/RasPiMouse_body.dae

This file was deleted.

466 changes: 466 additions & 0 deletions meshes/dae/body/raspimouse_body.dae

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions meshes/dae/body/raspimouse_camera_mount.dae

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions meshes/dae/body/raspimouse_top_plate.dae

Large diffs are not rendered by default.

Binary file added meshes/dae/body/rt-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,392 changes: 0 additions & 1,392 deletions meshes/dae/sensor/URG.dae → meshes/dae/sensor/urg_bottom_origin.dae

Large diffs are not rendered by default.

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions urdf/body/body.gazebo.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">

<gazebo reference="base_link">
<mu1>0.1</mu1>
<mu2>0.1</mu2>
</gazebo>

</robot>
73 changes: 26 additions & 47 deletions urdf/body/body.urdf.xacro
Original file line number Diff line number Diff line change
@@ -1,59 +1,38 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">

<xacro:macro name="base" params="parent lidar *joint_origin">
<xacro:include filename="$(find raspimouse_description)/urdf/body/body.gazebo.xacro" />

<xacro:macro name="base" params="parent *joint_origin">
<joint name="base_joint" type="fixed">
<xacro:insert_block name="joint_origin" />
<parent link="${parent}" />
<child link="base_link" />
</joint>
<link name="base_link">

<xacro:if value="${lidar == 'none'}">
<visual>
<geometry>
<mesh filename="package://raspimouse_description/meshes/dae/body/RasPiMouse_body.dae" />
</geometry>
</visual>
<collision>
<!-- <geometry> -->
<!-- <mesh filename="package://raspimouse_description/meshes/dae/body/RasPiMouse_body.dae" /> -->
<!-- </geometry> -->
<origin rpy="0 0 0" xyz="0.005 0 0.040" />
<geometry>
<box size="0.117 0.080 0.080" />
</geometry>
</collision>
<inertial>
<origin xyz="-0.005075 -0.000427 0.029879" />
<mass value="0.7186" />
<inertia ixx="0.001238161833" ixy="0.000000904986" iyy="0.001368529369"
ixz="0.000100297310" iyz="0.000022118177" izz="0.000784319117" />
</inertial>
</xacro:if>

<xacro:if value="${lidar == 'urg'}">
<visual>
<geometry>
<mesh filename="package://raspimouse_description/meshes/dae/body/RasPiMouse_body-TopPlate.dae"/>
</geometry>
</visual>
<collision>
<!-- <geometry> -->
<!-- <mesh filename="package://raspimouse_description/meshes/dae/body/RasPiMouse_body-TopPlate.dae" /> -->
<!-- </geometry> -->
<origin rpy="0 0 0" xyz="0.005 0 0.0435" />
<geometry>
<box size="0.117 0.080 0.087" />
</geometry>
</collision>
<inertial>
<origin xyz="-0.003851 -0.000443 0.031714" />
<mass value="0.759881"/>
<inertia ixx="0.001561279589" ixy="0.00000150035" iyy="0.001698462955"
ixz="0.000042679786" iyz="0.000023629024" izz="0.000855782529"/>
</inertial>
</xacro:if>
<visual>
<geometry>
<mesh filename="package://raspimouse_description/meshes/dae/body/raspimouse_body.dae" />
</geometry>
</visual>
<collision>
<!-- <geometry> -->
<!-- <mesh filename="package://raspimouse_description/meshes/dae/body/raspimouse_body.dae" /> -->
<!-- </geometry> -->
<origin rpy="0 0 0" xyz="0.005 0 0.040" />
<geometry>
<box size="0.117 0.080 0.080" />
</geometry>
</collision>
<inertial>
<mass value="0.7186" />
<origin xyz="-0.005075 0.0 0.03" />
<xacro:box_inertia m="0.7" x="0.1" y="0.08" z="0.08" />
<!-- <origin xyz="-0.005075 -0.000427 0.029879" /> -->
<!-- <inertia ixx="0.001238161833" ixy="0.000000904986" iyy="0.001368529369"
ixz="0.000100297310" iyz="0.000022118177" izz="0.000784319117" /> -->
</inertial>
</link>

</xacro:macro>
</robot>
61 changes: 61 additions & 0 deletions urdf/body/option.urdf.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">

<xacro:macro name="lidar_urg_mount" params="prefix parent *joint_origin">
<joint name="${prefix}_joint" type="fixed">
<xacro:insert_block name="joint_origin" />
<parent link="${parent}" />
<child link="${prefix}_link" />
</joint>
<link name="${prefix}_link">
<visual>
<geometry>
<mesh filename="package://raspimouse_description/meshes/dae/body/raspimouse_top_plate.dae"/>
</geometry>
</visual>
<collision>
<!-- <geometry> -->
<!-- <mesh filename="package://raspimouse_description/meshes/dae/body/raspimouse_top_plate.dae" /> -->
<!-- </geometry> -->
<origin rpy="0 0 0" xyz="0.005 0 0.0435" />
<geometry>
<box size="0.117 0.080 0.087" />
</geometry>
</collision>
<inertial>
<origin xyz="0 0 0.07" />
<mass value="0.04"/>
<xacro:box_inertia m="0.04" x="0.13" y="0.1" z="0.002" />
</inertial>
</link>
</xacro:macro>

<xacro:macro name="camera_mount" params="prefix parent *joint_origin">
<joint name="${prefix}_joint" type="fixed">
<xacro:insert_block name="joint_origin" />
<parent link="${parent}" />
<child link="${prefix}_link" />
</joint>
<link name="${prefix}_link">
<visual>
<geometry>
<mesh filename="package://raspimouse_description/meshes/dae/body/raspimouse_camera_mount.dae" />
</geometry>
</visual>
<collision>
<!-- <geometry> -->
<!-- <mesh filename="package://raspimouse_description/meshes/dae/body/raspimouse_camera_mount.dae" /> -->
<!-- </geometry> -->
<origin rpy="0 0 0" xyz="-0.006 0 0" />
<geometry>
<box size="0.03 0.068 0.0016" />
</geometry>
</collision>
<inertial>
<mass value="0.005" />
<xacro:box_inertia m="0.005" x="0.05" y="0.07" z="0.002" />
</inertial>
</link>
</xacro:macro>

</robot>
61 changes: 61 additions & 0 deletions urdf/camera/camera.gazebo.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0"?>
<robot name="csi_camera" xmlns:xacro="http://ros.org/wiki/xacro">

<xacro:macro name="camera_gazebo" params="camera_name camera_link robot_namespace robotdescription_namespace">

<gazebo reference="${camera_link}">
<material>Gazebo/FlatBlack</material>
</gazebo>

<link name="${camera_link}_tf_origin" />

<joint name="${camera_link}_tf_joint" type="fixed">
<origin xyz="0 0 0" rpy="0 0 0" />
<parent link="${camera_link}" />
<child link="${camera_link}_tf_origin" />
</joint>

<gazebo reference="${camera_link}_tf_origin">
<sensor type="camera" name="${camera_name}">
<visualize>$(arg camera_visual)</visualize>
<update_rate>30.0</update_rate>
<camera name="${camera_name}">
<pose>0 0 0 0 0 0</pose>
<horizontal_fov>1.39626</horizontal_fov> <!-- 80deg -->
<image>
<width>800</width>
<height>600</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.03</near>
<far>1</far>
</clip>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.007</stddev>
</noise>
</camera>

<plugin name="camera_controller_${camera_name}" filename="libgazebo_ros_camera.so">
<robotNamespace>${robot_namespace}</robotNamespace>
<alwaysOn>true</alwaysOn>
<updateRate>0.0</updateRate>
<cameraName>${camera_name}</cameraName>
<imageTopicName>image_raw</imageTopicName>
<cameraInfoTopicName>camera_info</cameraInfoTopicName>
<frameName>${robotdescription_namespace}${camera_link}_tf_origin</frameName>
<hackBaseline>0.0</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>
48 changes: 48 additions & 0 deletions urdf/camera/camera.urdf.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0"?>
<robot name="light_sensor" xmlns:xacro="http://ros.org/wiki/xacro">

<xacro:include filename="$(find raspimouse_description)/urdf/common.xacro" />
<xacro:include filename="$(find raspimouse_description)/urdf/camera/camera.gazebo.xacro" />

<xacro:macro name="webcam" params="prefix parent *joint_origin">
<joint name="${prefix}_joint" type="fixed">
<xacro:insert_block name="joint_origin" />
<parent link="${parent}" />
<child link="${prefix}_link" />
</joint>

<link name="${prefix}_link">
<visual>
<geometry>
<box size="0.01 0.03 0.02" />
</geometry>
<material name="Black" />
</visual>
<inertial>
<mass value="0.02" />
<xacro:box_inertia m="0.02" x="0.01" y="0.03" z="0.02" />
</inertial>
</link>

<joint name="${prefix}_lense_joint" type="fixed">
<origin xyz="0.005 0 0" rpy="0 1.57 0" />
<parent link="${prefix}_link" />
<child link="${prefix}_lense_link" />
</joint>

<link name="${prefix}_lense_link">
<origin rpy="0 0 " />
<visual>
<geometry>
<cylinder radius="0.005" length="0.001"/>
</geometry>
<material name="White">
<color rgba="1.0 1.0 1.0 2.0"/>
</material>
</visual>
</link>

<!-- Set up laser gazebo details -->
<!-- <hokuyo_laser /> -->
</xacro:macro>
</robot>
14 changes: 7 additions & 7 deletions urdf/raspimouse.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<link name="base_link">
<visual>
<geometry>
<mesh filename="package://raspimouse_description/meshes/dae/body/RasPiMouse_body.dae"/>
<mesh filename="package://raspimouse_description/meshes/dae/body/raspimouse_body.dae"/>
</geometry>
</visual>
</link>
Expand All @@ -20,13 +20,13 @@
<origin xyz="0 0.0425 0.02215" rpy="-1.57 0 0"/>
<axis xyz="0 0 1"/>
<parent link="base_link"/>
<child link="left_wheel"/>
<child link="left_wheel_link"/>
</joint>

<link name="left_wheel">
<link name="left_wheel_link">
<visual>
<geometry>
<mesh filename="package://raspimouse_description/meshes/dae/wheel/RasPiMouse_wheel.dae"/>
<mesh filename="package://raspimouse_description/meshes/dae/wheel/raspimouse_wheel.dae"/>
</geometry>
</visual>
</link>
Expand All @@ -35,13 +35,13 @@
<origin xyz="0 -0.0425 0.02215" rpy="1.57 0 0"/>
<axis xyz="0 0 1"/>
<parent link="base_link"/>
<child link="right_wheel"/>
<child link="right_wheel_link"/>
</joint>

<link name="right_wheel">
<link name="right_wheel_link">
<visual>
<geometry>
<mesh filename="package://raspimouse_description/meshes/dae/wheel/RasPiMouse_wheel.dae"/>
<mesh filename="package://raspimouse_description/meshes/dae/wheel/raspimouse_wheel.dae"/>
</geometry>
</visual>
</link>
Expand Down
Loading