๐ก ๋ณธ ๋ฌธ์๋ 'gazebo clearpath jackal ๋ชจ๋ฐ์ผ ๋ก๋ด ์ฌ์ฉํ๊ธฐ(velodyne vlp16 3d lidar)'์ ๋ํด ์ ๋ฆฌํด๋์ ๊ธ์ ๋๋ค.
gazebe์์ clearpath jackal ๋ชจ๋ฐ์ผ ๋ก๋ด๋ฅผ ์ค์ ํ์ฌ ํ์ํ ์ผ์๋ฅผ ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ์ ์ ๋ฆฌํ์์ผ๋ ์ฐธ๊ณ ํ์๊ธฐ ๋ฐ๋๋๋ค.
1. clearpath jackal: Launch (velodyne vlp16 3d lidar)
๋จผ์ ์ค์นํ์ฌ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ์ ์๊ฐํด๋๋ฆฌ๊ณ ๋ค๋ฅธ ์ผ์๋ก ๋ณ๊ฒฝํ๋ ๋ฐฉ๋ฒ์ ์ค๋ช ํ๊ฒ ์ต๋๋ค.
ROS ๋ฒ์ ์ noetic ๊ธฐ์ค์ผ๋ก ์์ฑํ์์ผ๋ฉฐ, ๋ค๋ฅธ ๋ฒ์ ์ ๊ฒฝ์ฐ ์ค์น์ ํด๋น ๋ฒ์ ์ผ๋ก ๋ณ๊ฒฝํ์ฌ ์ค์นํ์๋ฉด ๋ฉ๋๋ค.
1) INSTALLATION
jackal ํจํค์ง ์ค์น
sudo apt-get install ros-noetic-jackal-simulator ros-noetic-jackal-desktop ros-noetic-jackal-nav
jackal ์ปค์คํ ํจํค์ง ์ค์น(control, navigation, description, ...)
cd ~/catkin_ws/src/
git clone https://github.com/DrawingProcess/jackal
2) LAUNCH GAZEBO
i) base robot
roslaunch jackal_gazebo jackal_world.launch
ii) base + 2d laser
roslaunch jackal_gazebo jackal_world.launch config:=front_laser
iii) base + 3d lidar
roslaunch jackal_gazebo jackal_world.launch config:=3d_lidar
3) LAUNCH RVIZ
You can using the following launch invocation to start rviz with a pre-cooked configuration suitable for visualizing any standard Jackal config:
roslaunch jackal_viz view_robot.launch
+ VISUALIZING SENSORS
click the “Add” button, then select the “Topics” tab, and then select the front/scan topic:
SLAM ๋ฐ navigation ๊ด๋ จ ๋ด์ฉ์ ๊ณต์ ๋ฌธ์์ธ '[clearpath] clearpath jackal'๋ฅผ ์ฐธ๊ณ ํด์ฃผ์๋ฉด ๊ฐ์ฌํ๊ฒ ์ต๋๋ค.
2. clearpath jackal: Config (velodyne vlp16 3d lidar)
๋จผ์ jackal์์ ์ ๊ณตํ๋ ์ผ์๋ ๋ค์๊ณผ ๊ฐ์ผ๋ฉฐ, ์ผ์๋ค์ parameter๋ '[clearpath] JACKAL_DESCRIPTION PACKAGE'์ ์ ์๋์ด์์ผ๋ ์์ธํ ๋ด์ฉ์ ํด๋น ๋ถ๋ถ ์ฐธ๊ณ ํ์๊ธฐ ๋ฐ๋๋๋ค.
1) ์ผ์ ํ๋ผ๋ฏธํฐ ์ง์ ๋ณ๊ฒฝ
๊ธฐ๋ณธ์ ์ธ jackal ๋ชจ๋ธ์ jackal.urdf.xacro์ ์ ์๋์ด ์์ผ๋ฉฐ, ์ถ๊ฐ์ ์ธ ์ผ์๋ accessories.urdf.xacro์ ์ ์๋์ด ์์ต๋๋ค. ์ถ๊ฐ์ ์ธ ์ผ์ ์ค์ ๋ฐ ํด๋น ๋ณ์๋ฅผ ๋ณ๊ฒฝํ๊ณ ์ถ๋ค๋ฉด accessories.urdf.xacro ํ์ผ์ ํ์ธํ์๋ฉด ๋ฉ๋๋ค.
- jackal.urdf.xacro ์์น: jackal/jackal_description/urdf/jackal.urdf.xacro
- accessories.urdf.xacro ์์น: jackal/jackal_description/urdf/accessories.urdf.xacro
jackal.urdf.xacro ๋ด๋ถ์์ accessories.urdf.xacro๋ฅผ ์ฝ์ด๋ค์ด๊ธฐ์ accessories.urdf.xacro ํ์ผ๋ง ์์ ํ๋ฉด ์ผ์๋ฅผ ์ถ๊ฐํ ์ ์์ต๋๋ค.
<!-- Optional standard accessories, including their simulation data. The rendering
of these into the final description is controlled by optenv variables, which
default each one to off.-->
<xacro:include filename="$(find jackal_description)/urdf/accessories.urdf.xacro" />
์ด์ 3D ๋ผ์ด๋ค ์ผ์๋ฅผ ์ฌ์ฉํ๋๋ก ์ค์ ํด๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค. accessories.urdf.xacro ํ์ผ์ ํ์ธํด๋ณด๋ฉด JACKAL_LASER_3D์ด ์ ์ ๋์ด์๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค. ํด๋น ๋ณ์๋ฅผ 1๋ก๋ง ์์ ํ๋ฉด 3D lidar๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
<!--
Add a 3D lidar sensor. By default this is a Velodyne VLP16 but can be changed with the
JACKAL_LASER_3D_MODEL environment variable. Valid model designations are:
- vlp16 (default) :: Velodyne VLP16
- vlp32e :: Velodyne HDL-32E
-->
<xacro:if value="$(optenv JACKAL_LASER_3D 0)">
<xacro:property name="mount" value="$(optenv JACKAL_LASER_3D_MOUNT mid)" />
<xacro:property name="topic" value="$(optenv JACKAL_LASER_3D_TOPIC mid/points)" />
<xacro:property name="tower" value="$(optenv JACKAL_LASER_3D_TOWER 1)" />
<xacro:property name="prefix" value="$(optenv JACKAL_LASER_3D_PREFIX ${mount})" />
<xacro:property name="parent" value="$(optenv JACKAL_LASER_3D_PARENT ${mount}_mount)" />
<xacro:property name="lidar_3d_model" value="$(optenv JACKAL_LASER_3D_MODEL vlp16)" />
<!-- Velodyne VLP16 -->
<xacro:if value="${lidar_3d_model == 'vlp16'}">
<xacro:vlp16_mount topic="${topic}" tower="${tower}" prefix="${prefix}" parent_link="${parent}" >
<origin xyz="$(optenv JACKAL_LASER_3D_OFFSET 0 0 0)" rpy="$(optenv JACKAL_LASER_3D_RPY 0 0 0)" />
</xacro:vlp16_mount>
</xacro:if>
<!-- Velodyne HDL-32E -->
<xacro:if value="${lidar_3d_model == 'hdl32e'}">
<xacro:hdl32e_mount topic="${topic}" tower="${tower}" prefix="${prefix}" parent_link="${parent}" >
<origin xyz="$(optenv JACKAL_LASER_3D_OFFSET 0 0 0)" rpy="$(optenv JACKAL_LASER_3D_RPY 0 0 0)" />
</xacro:hdl32e_mount>
</xacro:if>
</xacro:if>
๋งค์ฐ ๊ฐ๋จํ์ฃ ? ๊ทธ๋ฐ๋ฐ ํด๋น ๋ฐฉ๋ฒ์ ๋์ค์ ์ด๋ฅผ ๋ณต๊ตฌํ๊ธฐ ์ํด์๋ ์์ ํ ๋ถ๋ถ์ ์ผ์ผ์ด ๋ค์ ์์ ํด์ฃผ์ด์ผ ํฉ๋๋ค. ๋ฐ๋ผ์ config ํ์ผ์ ๋์ด config ๊ฐ์ ์ง์ ํ์ฌ ์คํํ๋ ๋ฐฉ๋ฒ์ ์ค๋ช ํ๊ฒ ์ต๋๋ค.
2) config ๊ฐ ์ฝ์ด์ค๊ธฐ
์์ 2d lidar ๊ฐ ์ ์ฉ๋์ด ์๋ ๋ชจ๋ธ์ ๋ถ๋ฌ์ค๊ธฐ ์ํด์ ๋ค์๊ณผ ๊ฐ์ ๋ช ๋ น์ด๋ฅผ ์ฌ์ฉํ์ต๋๋ค.
roslaunch jackal_gazebo jackal_world.launch config:=front_laser
์ฌ๊ธฐ์ front_laser config๋ ๋ญ๊น์? find command๋ก ํ์ธํด๋ณด๋ฉด ๋ค์์ ๊ฒฝ๋ก์ ํด๋น ํ์ผ์ด ์๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.
~/catkin_ws/src/jackal$ find . | grep front_laser
./jackal_description/urdf/configs/front_laser
./jackal_description/urdf/configs/front_laser.bat
์ดํ ๊ฐ ํ์ผ์ ํ์ธํด๋ณด๋ฉด, ์์ accessories.urdf.xacro ํ์ผ์ <xacro:if value="$(optenv JACKAL_LASER 0)">์ฒ๋ผ ์ ์ ๋์ด์๋ optenv ๋ณ์๋ฅผ ์ค์ ํ๋ ํ์ผ์ธ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.
~/catkin_ws/src/jackal$ cat ./jackal_description/urdf/configs/front_laser.bat
@echo off
REM The front_laser configuration of Jackal is sufficient for
REM basic gmapping and navigation. It is mostly the default
REM config, but with a SICK LMS100 series LIDAR on the front,
REM pointing forward.
set JACKAL_LASER=1
๋ฐ๋ผ์ ์ด์ ์ ์ฌํ๊ฒ 3d_lidar, 3d_lidar.bat ํ์ผ์ ๋ง๋ค์ด์ฃผ๋ฉด ๋ฉ๋๋ค.
$ nano jackal/jackal_description/urdf/configs/3d_lidar
# The front_laser configuration of Jackal is sufficient for
# basic gmapping and navigation. It is mostly the default
# config, but with a SICK LMS100 series LIDAR on the front,
# pointing forward.
JACKAL_LASER_3D=1
JACKAL_LASER_3D_TOPIC="/velodyne_points"
$ nano jackal/jackal_description/urdf/configs/3d_lidar.bat
@echo off
REM The front_laser configuration of Jackal is sufficient for
REM basic gmapping and navigation. It is mostly the default
REM config, but with a SICK LMS100 series LIDAR on the front,
REM pointing forward.
set JACKAL_LASER_3D=1
set JACKAL_LASER_3D_TOPIC="/velodyne_points"
๊ทธ๋ฆฌ๊ณ ๋ค์์ ๋ช ๋ น์ด๋ก ์คํํ๋ฉด 3d lidar๊ฐ ์ ์ฉ๋ ๋ชจ๋ธ์ ํ์ธํ ์ ์์ต๋๋ค.
roslaunch jackal_gazebo jackal_world.launch config:=3d_lidar
์ฐธ๊ณ
- [clearpath] clearpath jackal: https://www.clearpathrobotics.com/assets/guides/noetic/jackal/simulation.html
- [clearpath] clearpath jackal navigation: https://www.clearpathrobotics.com/assets/guides/noetic/jackal/cartographer.html
- [clearpath] JACKAL_DESCRIPTION PACKAGE: https://www.clearpathrobotics.com/assets/guides/noetic/jackal/description.html
- [github] DrawingProcess/jackal: https://github.com/DrawingProcess/jackal
'Study: Robotics(Robot) > Robot: ROS(Robot Operating Sytem)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[ROS] ROS 2 Humble & Gazebo 11 ์ค์น ๋ฐ ์ธํ (0) | 2024.03.17 |
---|---|
[ROS] apt ์ค์นํ ํจํค์ง์ buildํ ํจํค์ง(catkin, colcon) ์ค ์ด๋ค ๊ฒ์ ์ฌ์ฉ? (0) | 2023.11.10 |
[ROS] ROS URDF vs. Gazebo SDF: Link Pose, Joint Pose, Visual & Collision (0) | 2023.10.27 |
[ROS] ROS TF ์ขํ๊ณ ๋ฐ ๋ณํ (0) | 2023.10.26 |
[ROS] ROS rosrun ์คํํ์ผ ๋ง๋ค๊ธฐ(python, cpp) (0) | 2023.10.12 |