Skip to content

Commit

Permalink
fix rplidar_laser_link name issue (#40, #53)
Browse files Browse the repository at this point in the history
- Rename rplidar_gpu_laser_link to rplidar_laser_link in bringup_with_laser.launch
- Add rplidar.launch to diffbot_bringup to support framed_id argument
- Make use of new diffbot_bringup/launch/rplidar.launch in bringup_with_laser.launch

This solves issues in RViz:
Transform [sender=unknown_publisher]
For frame [rplidar_gpu_laser_link]: Frame [rplidar_gpu_laser_link] does not exist

and in the terminal from whic diffbot_slam is launched:

[ WARN] [1635345613.864692611]: MessageFilter [target=odom ]: Dropped 100.00% of messages so far. Please turn the [ros.gmapping.message_filter] rosconsole logger to DEBUG for more information.
  • Loading branch information
fjp committed Jan 22, 2022
1 parent 83bcaf0 commit 60750e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diffbot_bringup/launch/bringup_with_laser.launch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<launch>
<arg name="laser_frame_id" default="rplidar_gpu_laser_link" />
<arg name="laser_frame_id" default="rplidar_laser_link" />
<!--arg name="model" default="$(env DIFFBOT_MODEL)" doc="model type [diffbot, remo]"/-->
<arg name="model" default="diffbot" doc="model type [diffbot, remo]"/>

Expand All @@ -22,7 +22,7 @@
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"
output="screen" ns="diffbot" />

<include file="$(find rplidar_ros)/launch/rplidar.launch" ns="diffbot">
<include file="$(find diffbot_bringup)/launch/rplidar.launch" ns="diffbot">
<arg name="laser_frame_id" value="$(arg laser_frame_id)" />
</include>

Expand Down
12 changes: 12 additions & 0 deletions diffbot_bringup/launch/rplidar.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<launch>
<arg name="laser_frame_id" default="rplidar_laser_link" />

<node name="rplidarNode" pkg="rplidar_ros" type="rplidarNode" output="screen">
<param name="serial_port" type="string" value="/dev/ttyUSB0"/>
<param name="serial_baudrate" type="int" value="115200"/><!--A1/A2 -->
<!--param name="serial_baudrate" type="int" value="256000"--><!--A3 -->
<param name="frame_id" type="string" value="$(arg laser_frame_id)"/>
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
</node>
</launch>

0 comments on commit 60750e9

Please sign in to comment.