ira_laser_tools를 사용하여 두 리다드의 scan 데이터를 통합합시다!
본문의 목적
목적은 두 개의 서로 다른 리다드의scan 데이터를 하나의scan 데이터로 통합시키는 것이다.
컨디션
본 보도는 다음과 같은 환경에서 실험을 진행한다.
항목
릴리즈
Ubuntu
18.04
ROS
Melodic
RPLidar
A1 M8
Ubuntu와 ROS의 환경 구축은 다른 사이트를 참조하십시오.
ira_laser_tools를 사용하여 두 개의 lidar의scan 데이터를 통합합니다
두 개의 rplidar 시작
우선 집행 권한을 주다.$ sudo chmod 666 /dev/ttyUSB0
$ sudo chmod 666 /dev/ttyUSB1
여기에 USB 0과 USB 1은 삽입 순서에 따라 다릅니다.이번에는 퍼스트 프론트.리다라기 때문에 front 측을 연결한 다음에 백 측을 연결합니다.
다음은 두 개의 리다를 시작합니다.
rplidar.launch<launch>
<!-- first laser -->
<node name="first_rplidar" pkg="rplidar_ros" type="rplidarNode" output="screen">
<param name="serial_port" type="string" value="/dev/ttyUSB0"/>
<param name="serial_baudrate" type="int" value="115200"/>
<param name="frame_id" type="string" value="front_lidar"/>
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
<remap from="/scan" to="/front_scan" />
</node>
<!-- second laser -->
<node name="second_rplidar" pkg="rplidar_ros" type="rplidarNode" output="screen">
<param name="serial_port" type="string" value="/dev/ttyUSB1"/>
<param name="serial_baudrate" type="int" value="115200"/>
<param name="frame_id" type="string" value="back_lidar"/>
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
<remap from="/scan" to="/back_scan" />
</node>
</launch>
여기 리맵 각자의scan 데이터가 있습니다.rempa에 관해서는 아래의 문장을 참조하세요.
같은 노드를 동시에 시작할 수 없기 때문에 노드의 이름을 반드시 변경하십시오.이번에 우리는 node name = "first rplidar", node name = "second rplidar"라는 이름을 지었다.
다음은 기준이 되는 프레임과 리다드의 측정 범위 등을 설정합니다.
laserscan_multi_merger.launch<launch>
<node pkg="ira_laser_tools" name="laserscan_multi_merger" type="laserscan_multi_merger" output="screen">
<!--<param name="destination_frame" value="cart_frame"/>-->
<param name="destination_frame" value="front_lidar"/>
<param name="cloud_destination_topic" value="/merged_cloud"/>
<param name="scan_destination_topic" value="/scan"/>
<param name="laserscan_topics" value ="/front_scan /back_scan" /> <!-- LIST OF THE LASER SCAN TOPICS TO SUBSCRIBE -->
<param name="angle_min" value="-3.14159"/>
<param name="angle_max" value="3.14159"/>
<param name="angle_increment" value="0.0058"/>
<param name="scan_time" value="0.0333333"/>
<param name="range_min" value="0.05"/>
<param name="range_max" value="50.0"/>
</node>
</launch>
마지막으로 프론트와 백의 프레임의 static.발행 tf
merge_lidar.launch<launch>
<!-- <static_transform_publisher x y z yaw pitch roll frame_id child_frame_id period_in_ms>
Publish a static coordinate transform to tf using an x/y/z offset and yaw/pitch/roll.
The period, in milliseconds, specifies how often to send a transform. 100ms (10hz) is a good value. -->
<node pkg="tf" type="static_transform_publisher" name="front_to_back" args=" -0.2 0 0 3.14 0 0 front_lidar back_lidar 100" />
<include file="$(find ira_laser_tools)/launch/laserscan_multi_merger.launch" ></include>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find ira_laser_tools)/rviz/merge_lidar.rviz" />
</launch>
이번 리다드의 위치 관계는 다음과 같은 이미지이기 때문에.
<node pkg="tf" type="static_transform_publisher" name="front_to_back" args=" -0.2 0 0 3.14 0 0 front_lidar back_lidar 100" />
및 릴리즈됩니다.이 가격에 관해서는 사용 환경에 따라 조절해 주십시오.
rplider의 좌표계에 관해서는 아래의 멋진 문장을 참고하세요.
상술한 보도에서 말한 바와 같이 진전 방향에 주의해 주십시오.
병합 결과
다음 명령을 순서대로 집행하다.$ roslaunch ira_laser_tools rplidar.launch
$ roslaunch ira_laser_tools merge_lidar.launch
토픽은 다음과 같은 내용을 발매했다./clicked_point
/front_scan
/initialpose
/laserscan_multi_merger/parameter_descriptions
/laserscan_multi_merger/parameter_updates
/merged_cloud
/move_base_simple/goal
/rosout
/rosout_agg
/scan
/tf
/tf_static
front의scan 데이터는 다음과 같다.
백의scan 데이터는 다음과 같다.
front와 백의scan 데이터를 합친 결과는 다음과 같습니다.
두 라이더의 점군이 합쳐져 있기 때문에 점군이 긴밀해지는 것을 알 수 있다.
물론 통합된 scan 데이터를 이용하여 지도 생성을 할 수도 있다.hector 시도나는 슬램으로 지도를 만들었다.
지도의 생성에 관해서는 아래의 멋진 문장을 참고하시오.
위의 글은 gmapping입니다.slam, hector_슬램, 캐트랩은 모든 실행 절차를 기록하기 때문에 좋아하는 슬램을 시도해 보세요.
또한 이번에 사용된 launch 파일과 rviz 파일은 아래 창고에 있습니다.적당히 참고하세요.
총결산
본 보도는 다음과 같은 환경에서 실험을 진행한다.
항목
릴리즈
Ubuntu
18.04
ROS
Melodic
RPLidar
A1 M8
Ubuntu와 ROS의 환경 구축은 다른 사이트를 참조하십시오.
ira_laser_tools를 사용하여 두 개의 lidar의scan 데이터를 통합합니다
두 개의 rplidar 시작
우선 집행 권한을 주다.$ sudo chmod 666 /dev/ttyUSB0
$ sudo chmod 666 /dev/ttyUSB1
여기에 USB 0과 USB 1은 삽입 순서에 따라 다릅니다.이번에는 퍼스트 프론트.리다라기 때문에 front 측을 연결한 다음에 백 측을 연결합니다.
다음은 두 개의 리다를 시작합니다.
rplidar.launch<launch>
<!-- first laser -->
<node name="first_rplidar" pkg="rplidar_ros" type="rplidarNode" output="screen">
<param name="serial_port" type="string" value="/dev/ttyUSB0"/>
<param name="serial_baudrate" type="int" value="115200"/>
<param name="frame_id" type="string" value="front_lidar"/>
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
<remap from="/scan" to="/front_scan" />
</node>
<!-- second laser -->
<node name="second_rplidar" pkg="rplidar_ros" type="rplidarNode" output="screen">
<param name="serial_port" type="string" value="/dev/ttyUSB1"/>
<param name="serial_baudrate" type="int" value="115200"/>
<param name="frame_id" type="string" value="back_lidar"/>
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
<remap from="/scan" to="/back_scan" />
</node>
</launch>
여기 리맵 각자의scan 데이터가 있습니다.rempa에 관해서는 아래의 문장을 참조하세요.
같은 노드를 동시에 시작할 수 없기 때문에 노드의 이름을 반드시 변경하십시오.이번에 우리는 node name = "first rplidar", node name = "second rplidar"라는 이름을 지었다.
다음은 기준이 되는 프레임과 리다드의 측정 범위 등을 설정합니다.
laserscan_multi_merger.launch<launch>
<node pkg="ira_laser_tools" name="laserscan_multi_merger" type="laserscan_multi_merger" output="screen">
<!--<param name="destination_frame" value="cart_frame"/>-->
<param name="destination_frame" value="front_lidar"/>
<param name="cloud_destination_topic" value="/merged_cloud"/>
<param name="scan_destination_topic" value="/scan"/>
<param name="laserscan_topics" value ="/front_scan /back_scan" /> <!-- LIST OF THE LASER SCAN TOPICS TO SUBSCRIBE -->
<param name="angle_min" value="-3.14159"/>
<param name="angle_max" value="3.14159"/>
<param name="angle_increment" value="0.0058"/>
<param name="scan_time" value="0.0333333"/>
<param name="range_min" value="0.05"/>
<param name="range_max" value="50.0"/>
</node>
</launch>
마지막으로 프론트와 백의 프레임의 static.발행 tf
merge_lidar.launch<launch>
<!-- <static_transform_publisher x y z yaw pitch roll frame_id child_frame_id period_in_ms>
Publish a static coordinate transform to tf using an x/y/z offset and yaw/pitch/roll.
The period, in milliseconds, specifies how often to send a transform. 100ms (10hz) is a good value. -->
<node pkg="tf" type="static_transform_publisher" name="front_to_back" args=" -0.2 0 0 3.14 0 0 front_lidar back_lidar 100" />
<include file="$(find ira_laser_tools)/launch/laserscan_multi_merger.launch" ></include>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find ira_laser_tools)/rviz/merge_lidar.rviz" />
</launch>
이번 리다드의 위치 관계는 다음과 같은 이미지이기 때문에.
<node pkg="tf" type="static_transform_publisher" name="front_to_back" args=" -0.2 0 0 3.14 0 0 front_lidar back_lidar 100" />
및 릴리즈됩니다.이 가격에 관해서는 사용 환경에 따라 조절해 주십시오.
rplider의 좌표계에 관해서는 아래의 멋진 문장을 참고하세요.
상술한 보도에서 말한 바와 같이 진전 방향에 주의해 주십시오.
병합 결과
다음 명령을 순서대로 집행하다.$ roslaunch ira_laser_tools rplidar.launch
$ roslaunch ira_laser_tools merge_lidar.launch
토픽은 다음과 같은 내용을 발매했다./clicked_point
/front_scan
/initialpose
/laserscan_multi_merger/parameter_descriptions
/laserscan_multi_merger/parameter_updates
/merged_cloud
/move_base_simple/goal
/rosout
/rosout_agg
/scan
/tf
/tf_static
front의scan 데이터는 다음과 같다.
백의scan 데이터는 다음과 같다.
front와 백의scan 데이터를 합친 결과는 다음과 같습니다.
두 라이더의 점군이 합쳐져 있기 때문에 점군이 긴밀해지는 것을 알 수 있다.
물론 통합된 scan 데이터를 이용하여 지도 생성을 할 수도 있다.hector 시도나는 슬램으로 지도를 만들었다.
지도의 생성에 관해서는 아래의 멋진 문장을 참고하시오.
위의 글은 gmapping입니다.slam, hector_슬램, 캐트랩은 모든 실행 절차를 기록하기 때문에 좋아하는 슬램을 시도해 보세요.
또한 이번에 사용된 launch 파일과 rviz 파일은 아래 창고에 있습니다.적당히 참고하세요.
총결산
$ sudo chmod 666 /dev/ttyUSB0
$ sudo chmod 666 /dev/ttyUSB1
<launch>
<!-- first laser -->
<node name="first_rplidar" pkg="rplidar_ros" type="rplidarNode" output="screen">
<param name="serial_port" type="string" value="/dev/ttyUSB0"/>
<param name="serial_baudrate" type="int" value="115200"/>
<param name="frame_id" type="string" value="front_lidar"/>
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
<remap from="/scan" to="/front_scan" />
</node>
<!-- second laser -->
<node name="second_rplidar" pkg="rplidar_ros" type="rplidarNode" output="screen">
<param name="serial_port" type="string" value="/dev/ttyUSB1"/>
<param name="serial_baudrate" type="int" value="115200"/>
<param name="frame_id" type="string" value="back_lidar"/>
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
<remap from="/scan" to="/back_scan" />
</node>
</launch>
<launch>
<node pkg="ira_laser_tools" name="laserscan_multi_merger" type="laserscan_multi_merger" output="screen">
<!--<param name="destination_frame" value="cart_frame"/>-->
<param name="destination_frame" value="front_lidar"/>
<param name="cloud_destination_topic" value="/merged_cloud"/>
<param name="scan_destination_topic" value="/scan"/>
<param name="laserscan_topics" value ="/front_scan /back_scan" /> <!-- LIST OF THE LASER SCAN TOPICS TO SUBSCRIBE -->
<param name="angle_min" value="-3.14159"/>
<param name="angle_max" value="3.14159"/>
<param name="angle_increment" value="0.0058"/>
<param name="scan_time" value="0.0333333"/>
<param name="range_min" value="0.05"/>
<param name="range_max" value="50.0"/>
</node>
</launch>
<launch>
<!-- <static_transform_publisher x y z yaw pitch roll frame_id child_frame_id period_in_ms>
Publish a static coordinate transform to tf using an x/y/z offset and yaw/pitch/roll.
The period, in milliseconds, specifies how often to send a transform. 100ms (10hz) is a good value. -->
<node pkg="tf" type="static_transform_publisher" name="front_to_back" args=" -0.2 0 0 3.14 0 0 front_lidar back_lidar 100" />
<include file="$(find ira_laser_tools)/launch/laserscan_multi_merger.launch" ></include>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find ira_laser_tools)/rviz/merge_lidar.rviz" />
</launch>
<node pkg="tf" type="static_transform_publisher" name="front_to_back" args=" -0.2 0 0 3.14 0 0 front_lidar back_lidar 100" />
$ roslaunch ira_laser_tools rplidar.launch
$ roslaunch ira_laser_tools merge_lidar.launch
/clicked_point
/front_scan
/initialpose
/laserscan_multi_merger/parameter_descriptions
/laserscan_multi_merger/parameter_updates
/merged_cloud
/move_base_simple/goal
/rosout
/rosout_agg
/scan
/tf
/tf_static
참고 문헌
Reference
이 문제에 관하여(ira_laser_tools를 사용하여 두 리다드의 scan 데이터를 통합합시다!), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/MMM-lab/items/84cdf9a8ad97324e10ed
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
Reference
이 문제에 관하여(ira_laser_tools를 사용하여 두 리다드의 scan 데이터를 통합합시다!), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/MMM-lab/items/84cdf9a8ad97324e10ed텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)