Re: Questions about the structure of a launch file.
Posted by
Mikor on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Questions-about-the-structure-of-a-launch-file-tp7719p7744.html
Hmmm so, let's say that I need to replicate a command looking like this in the terminal:
roslaunch rtabmap_ros rtabmap.launch \
use_sim_time:=true \
depth:=false \
subscribe_scan_cloud:=true \
frame_id:=velodyne \
scan_cloud_topic:=/pointcloud2 \
scan_cloud_max_points:=131072 \
icp_odometry:=true \
approx_sync:=false \
args:="-d \
--RGBD/CreateOccupancyGrid false \
--Rtabmap/DetectionRate 2 \
--Odom/ScanKeyFrameThr 0.9 \
--OdomF2M/ScanMaxSize 25000 \
--OdomF2M/ScanSubtractRadius 0.5 \
--Icp/PM true \
--Icp/VoxelSize 0.5 \
--Icp/MaxTranslation 5 \
--Icp/MaxCorrespondenceDistance 1.5 \
--Icp/PMOutlierRatio 0.8 \
--Icp/Iterations 10 \
--Icp/PointToPlane true \
--Icp/PMMatcherKnn 3 \
--Icp/PMMatcherEpsilon 0 \
--Icp/Epsilon 0.0001 \
--Icp/PointToPlaneK 10 \
--Icp/PointToPlaneRadius 0 \
--Icp/CorrespondenceRatio 0.01 \
--Odom/GuessSmoothingDelay 1" I created a corresponding launch file looking like this
<launch>
<arg name="rtabmapviz" default="true"/>
<arg name="frame_id" default="velodyne"/>
<arg name="use_sim_time" default="true"/>
<arg name="common_params" value="--RGBD/CreateOccupancyGrid false \
--Rtabmap/DetectionRate 2 \
--Odom/ScanKeyFrameThr 0.9 \
--OdomF2M/ScanMaxSize 25000 \
--OdomF2M/ScanSubtractRadius 0.5 \
--Icp/PM true \
--Icp/VoxelSize 0.5 \
--Icp/MaxTranslation 5 \
--Icp/MaxCorrespondenceDistance 1.5 \
--Icp/PMOutlierRatio 0.8 \
--Icp/Iterations 10 \
--Icp/PointToPlane true \
--Icp/PMMatcherKnn 3 \
--Icp/PMMatcherEpsilon 0 \
--Icp/Epsilon 0.0001 \
--Icp/PointToPlaneK 10 \
--Icp/PointToPlaneRadius 0 \
--Icp/CorrespondenceRatio 0.01 \
--Odom/GuessSmoothingDelay 1"/>
<group ns = "rtabmap">
<node pkg="rtabmap_ros" type="icp_odometry" name="icp_odometry" output="screen" args="$(arg common_params)">
<remap from="scan_cloud" to="/pointcloud2"/>
<param name="frame_id" type="string" value="$(arg frame_id)"/>
<param name="odom_frame_id" type="string" value="odom"/>
</node>
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap" output="screen" args="-d">
<param name="frame_id" type="string" value="$(arg frame_id)"/>
<param name="subscribe_depth" type="bool" value="false"/>
<param name="subscribe_rgb" type="bool" value="false"/>
<param name="subscribe_scan_cloud" type="bool" value="true"/>
<param name="approx_sync" type="bool" value="true"/>
<remap from="scan_cloud" to="/pointcloud2"/>
</node>
<node pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" output="screen" args="$(arg common_params)">
<param name="frame_id" type="string" value="$(arg frame_id)"/>
<param name="odom_frame_id" type="string" value="odom"/>
<param name="subscribe_odom_info" type="bool" value="true"/>
<param name="subscribe_scan_cloud" type="bool" value="true"/>
<param name="approx_sync" type="bool" value="false"/>
<remap from="scan_cloud" to="/pointcloud2"/>
</node>
</group>
</launch>
Thinking that it should work the same way but it is not, what am I missing ?
Thanks in advance,
Anthony.