Skip to content

Commit

Permalink
Foxy版リリース (#39)
Browse files Browse the repository at this point in the history
* LiDARの追加 (#38)

* Update descriptions

* Adds stl data of multi LIDAR mount

* Adds xacro if for lds and rplidar.

* Adds macro lidar_multi_mount

* Adds macro lidar_multi_sensor

* Update README. Adds License description

* Adds stl file for LDS

* Update specs

* Update collision size

* Adjust positions

* Add colors

* Adds legs for LDS

* fix typo

* Adds lidar parameter to macro lidar_multi_sensor.

* Adds RPLIDAR thing

* Adds lidar parameter to macro lidar_multi_sensor

* Adds if statement. rplidar is to be added

* Update README

* Update file name

* Update links

* Update lidar macro

* update macro names

* Adds RPLIDAR macros

* Update specs for RPLIDAR

* Updates the position of LDS and the length of its legs

* Updates RPLIDAR's position

* Adds a command that displays the lidar mounted on the robot.

* Replace material color to black

* Adds leg visual macro for the lidars

* Remove comments

* Update urdf/raspimouse.urdf.xacro

Co-authored-by: Shota Aoki <[email protected]>

* Adjust the collision size and position of the LIDARs

* Remove comment

* Adjusts the size of the collision of the multi_lidar_mount

* Adjust the inertial position

* Adjust the inertial height of each LIDAR

* LiDARマウントの重心位置を修正

Co-authored-by: Shota Aoki <[email protected]>

* Update version

* Fix typo and add author

* Adds change log

Co-authored-by: Shota Aoki <[email protected]>
  • Loading branch information
Shuhei Kozasa and Shota Aoki authored Jul 12, 2022
1 parent b9487f2 commit 04a3d1f
Show file tree
Hide file tree
Showing 9 changed files with 178 additions and 11 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package raspimouse_description
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.0.0 (2022-07-12)
------------------
* LiDARの追加 (`#38 <https://github.com/rt-net/raspimouse_description/issues/38>`_)
* Merge master branch (ROS1) into ros2 branch (`#37 <https://github.com/rt-net/raspimouse_description/issues/37>`_)
* Update library to rviz2 (`#36 <https://github.com/rt-net/raspimouse_description/issues/36>`_)
* Update tread (ROS 2) (`#32 <https://github.com/rt-net/raspimouse_description/issues/32>`_)
* Update README for ROS 2 (`#26 <https://github.com/rt-net/raspimouse_description/issues/26>`_)
* Support ROS 2 Foxy (`#24 <https://github.com/rt-net/raspimouse_description/issues/24>`_)
* Contributors: Daisuke Sato, Shota Aoki, Shuhei Kozasa
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,20 @@ source install/setup.bash

## How to Use

Display a Raspberry Pi Mouse robot model on RViz2 with the following comand:
Display a Raspberry Pi Mouse robot model on RViz2 with the following command:

```sh
ros2 launch raspimouse_description display.launch.py
```

You can also display a LiDAR mounted robot model with the following command:

```sh
ros2 launch raspimouse_description display.launch.py lidar:=rplidar
```

The `lidar` option supports `urg`, `lds`, and `rplidar`.

## LICENSE

(C) 2016-2021 RT Corporation
Expand All @@ -48,3 +56,6 @@ Unless attributed otherwise, everything in this repository is under the MIT lice
### Acknowledgements

Special thanks to https://gbiggs.github.io/rosjp_urdf_tutorial_text/index.html

The file [robotis_lds01.stl](./meshes/stl/robotis_lds01.stl) is released from ROBOTIS and licensed under the [Apache License 2.0](https://github.com/ROBOTIS-GIT/turtlebot3/blob/a3c515b350a752b93ed8de4a009442e80e9d787d/LICENSE).
The original file is released in [turtlebot3_description package](https://github.com/ROBOTIS-GIT/turtlebot3/blob/a3c515b350a752b93ed8de4a009442e80e9d787d/turtlebot3_description/meshes/sensors/lds.stl).
2 changes: 1 addition & 1 deletion launch/display.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def generate_launch_description():
declare_arg_lidar = DeclareLaunchArgument(
'lidar',
default_value='none',
description='Set "none" or "urg".')
description='Set "none", "urg", "lds", or "rplidar".')
declare_arg_lidar_frame = DeclareLaunchArgument(
'lidar_frame',
default_value='laser',
Expand Down
Binary file added meshes/stl/RasPiMouse_MultiLiDARMount.stl
Binary file not shown.
Binary file added meshes/stl/robotis_lds01.stl
Binary file not shown.
5 changes: 3 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>raspimouse_description</name>
<version>0.1.0</version>
<version>1.0.0</version>
<description>The raspimouse_description package</description>
<maintainer email="[email protected]">RT Corporation</maintainer>
<author email="[email protected]">Daisuke Sato</author>
<author email="[email protected]">Daisuke Sato</author>
<author email="[email protected]">Shota Aoki</author>
<author email="[email protected]">Shuhei Kozasa</author>

<license>MIT</license>

Expand Down
32 changes: 29 additions & 3 deletions urdf/body/option.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
</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" />
Expand All @@ -30,4 +27,33 @@
</link>
</xacro:macro>

<xacro:macro name="lidar_multi_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/stl/RasPiMouse_MultiLiDARMount.stl" scale="0.001 0.001 0.001"/>
</geometry>
<material name="Light Black">
<color rgba="0.2 0.2 0.2 1.0" />
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0.0 0 0.002" />
<geometry>
<box size="0.135 0.095 0.005" />
</geometry>
</collision>
<inertial>
<origin xyz="0 0 0.002" />
<mass value="0.04"/>
<xacro:box_inertia m="0.04" x="0.13" y="0.1" z="0.002" />
</inertial>
</link>
</xacro:macro>

</robot>
29 changes: 29 additions & 0 deletions urdf/raspimouse.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<xacro:arg name="robot_namespace" default="/" />
<xacro:arg name="diffdrive_namespace" default="/" />
<xacro:arg name="sensor_namespace" default="raspimouse_on_gazebo" />

<material name="black">
<color rgba="0.2 0.2 0.2 1.0"/>
</material>

<xacro:include filename="$(find raspimouse_description)/urdf/common.xacro" />
<xacro:include filename="$(find raspimouse_description)/urdf/body/body.urdf.xacro" />
Expand Down Expand Up @@ -72,6 +76,23 @@
</xacro:lidar_urg_sensor>
</xacro:if>

<xacro:if value="${'$(arg lidar)' == 'lds'}">
<xacro:lidar_multi_mount prefix="lds_multi_mount" parent="base_link">
<origin xyz="0 0 0.0855" rpy="0 0 0" />
</xacro:lidar_multi_mount>
<xacro:lidar_lds_sensor sensor_link_name="$(arg lidar_frame)" parent="$(arg lidar)_multi_mount_link">
<origin xyz="0.0 0.0 0.0345" rpy="0 0 3.14" />
</xacro:lidar_lds_sensor>
</xacro:if>

<xacro:if value="${'$(arg lidar)' == 'rplidar'}">
<xacro:lidar_multi_mount prefix="rplidar_multi_mount" parent="base_link">
<origin xyz="0 0 0.0855" rpy="0 0 0" />
</xacro:lidar_multi_mount>
<xacro:lidar_rp_sensor sensor_link_name="$(arg lidar_frame)" parent="$(arg lidar)_multi_mount_link">
<origin xyz="0.0 0.0 0.0445" rpy="0 0 3.14"/> <!-- The LIDAR is about 13cm from the ground-->
</xacro:lidar_rp_sensor>
</xacro:if>

<!-- =============== Gazebo =============== -->

Expand Down Expand Up @@ -104,6 +125,14 @@
<xacro:lidar_gazebo sensor_link_name="$(arg lidar_frame)" base_rad="0" rad_range="4.71" min_range="0.10" max_range="5.6" />
</xacro:if>

<xacro:if value="${'$(arg lidar)' == 'lds'}">
<xacro:lidar_gazebo sensor_link_name="$(arg lidar_frame)" base_rad="0" rad_range="6.28" min_range="0.12" max_range="3.50" />
</xacro:if>

<xacro:if value="${'$(arg lidar)' == 'rplidar'}">
<xacro:lidar_gazebo sensor_link_name="$(arg lidar_frame)" base_rad="0" rad_range="6.28" min_range="0.15" max_range="12" />
</xacro:if>

<!-- DiffDriveController -->
<xacro:diffdrive_gazebo publish_tf="$(arg tf)" publish_jointstate="$(arg jointstate)"
robot_namespace="$(arg diffdrive_namespace)" />
Expand Down
95 changes: 91 additions & 4 deletions urdf/sensors/lidar.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,37 @@

<xacro:arg name="laser_visual" default="false"/>

<xacro:macro name="lidar_legs" params="length radius z_pos">
<visual>
<origin xyz="0.035 0.025 ${z_pos}" rpy="0 0 0" />
<geometry>
<cylinder length="${length}" radius="${radius}" />
</geometry>
<material name="black" />
</visual>
<visual>
<origin xyz="0.035 -0.025 ${z_pos}" rpy="0 0 0" />
<geometry>
<cylinder length="${length}" radius="${radius}" />
</geometry>
<material name="black" />
</visual>
<visual>
<origin xyz="-0.022 0.031 ${z_pos}" rpy="0 0 0" />
<geometry>
<cylinder length="${length}" radius="${radius}" />
</geometry>
<material name="black" />
</visual>
<visual>
<origin xyz="-0.022 -0.031 ${z_pos}" rpy="0 0 0" />
<geometry>
<cylinder length="${length}" radius="${radius}" />
</geometry>
<material name="black" />
</visual>
</xacro:macro>

<xacro:macro name="lidar_urg_sensor" params="sensor_link_name parent *joint_origin">
<joint name="${sensor_link_name}_joint" type="fixed">
<xacro:insert_block name="joint_origin"/>
Expand All @@ -19,19 +50,75 @@
</geometry>
</visual>
<collision>
<!-- <geometry> -->
<!-- <mesh filename="package://raspimouse_description/meshes/dae/sensor/urg_optical_axis_center_origin.dae"/> -->
<!-- </geometry> -->
<origin xyz="0 0 -0.01815" />
<geometry>
<cylinder radius="0.025" length="0.070"/>
</geometry>
</collision>
<inertial>
<mass value="0.160" />
<mass value="0.16" />
<origin xyz="0 0 0" />
<xacro:cylinder_inertia m="0.16" r="0.025" h="0.07" />
</inertial>
</link>
</xacro:macro>

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

<link name="${sensor_link_name}">
<visual>
<geometry>
<mesh filename="package://raspimouse_description/meshes/stl/robotis_lds01.stl" scale="0.001 0.001 0.001"/>
</geometry>
<material name="black"/>
</visual>
<xacro:lidar_legs length="0.019" radius="0.005" z_pos="-0.0228"/>
<collision>
<geometry>
<cylinder radius="0.035" length="0.040"/>
</geometry>
<origin xyz="0 0 -0.008" />
</collision>
<inertial>
<mass value="0.160" />
<origin xyz="0 0 0" />
<xacro:cylinder_inertia m="0.16" r="0.025" h="0.03" />
</inertial>
</link>
</xacro:macro>

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

<link name="${sensor_link_name}">
<visual>
<geometry>
<mesh filename="package://raspimouse_description/meshes/stl/robotis_lds01.stl" scale="0.001 0.001 0.001"/>
</geometry>
<material name="black"/>
</visual>
<xacro:lidar_legs length="0.027" radius="0.003" z_pos="-0.028"/>
<collision>
<geometry>
<cylinder radius="0.036" length="0.042"/>
</geometry>
<origin xyz="0 0 -0.008" />
</collision>
<inertial>
<mass value="0.160" />
<origin xyz="0 0 0" />
<xacro:cylinder_inertia m="0.16" r="0.025" h="0.03" />
</inertial>
</link>
</xacro:macro>

</robot>

0 comments on commit 04a3d1f

Please sign in to comment.