I'm trying to publish merged point cloud from multiple Kinects as one topic. In order to align clouds I applied static_transform_publisher, which merged all the clouds into one frame ("kinect"). Unfortunately, I need to publish this frame to save the resultant point cloud using pointcloud_to_pcd.
I've found that "pub" can be used to do it, but I'm confused about the arguments:
<node pkg="rostopic" type="rostopic" name="joined_kinects" args="pub /kinect "/>
If you can comment on how to improve the performance of such a system, please also share what can be applied (maybe using a bunch of C++ subscription code instead of a launch file), as currently in Rviz I get around 5 fps.
My launch file:
<launch>
<arg name="camera1_id" default="A22596V03205310A" />
<arg name="camera2_id" default="A22596V02246310A" />
<arg name="camera3_id" default="A22596V02323310A" />
<arg name="camera4_id" default="A22596V03345310A" />
<arg name="depth_registration" default="true" />
<arg name="camera1_name" default="kinect1" />
<arg name="camera2_name" default="kinect2" />
<arg name="camera3_name" default="kinect3" />
<arg name="camera4_name" default="kinect4" />
<rosparam>
/use_sim_time : false
</rosparam>
<include file="$(find freenect_launch)/launch/freenect.launch">
<arg name="device_id" value="$(arg camera1_id)" />
<arg name="camera" value="$(arg camera1_name)" />
<arg name="depth_registration" value="$(arg depth_registration)" />
</include>
<include file="$(find freenect_launch)/launch/freenect.launch">
<arg name="device_id" value="$(arg camera2_id)" />
<arg name="camera" value="$(arg camera2_name)" />
<arg name="depth_registration" value="$(arg depth_registration)" />
</include>
<include file="$(find freenect_launch)/launch/freenect.launch">
<arg name="device_id" value="$(arg camera3_id)" />
<arg name="camera" value="$(arg camera3_name)" />
<arg name="depth_registration" value="$(arg depth_registration)" />
</include>
<include file="$(find freenect_launch)/launch/freenect.launch">
<arg name="device_id" value="$(arg camera4_id)" />
<arg name="camera" value="$(arg camera4_name)" />
<arg name="depth_registration" value="$(arg depth_registration)" />
</include>
<node name="kinect1_depth_optical_frame" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 kinect kinect1_depth_optical_frame 40" />
<node name="kinect1_rgb_optical_frame" pkg="tf" type="static_transform_publisher" args="0 0 0 0 0 0 kinect kinect1_rgb_optical_frame 40" />
<node name="kinect2_depth_optical_frame" pkg="tf" type="static_transform_publisher" args="-1.904 -1.109 1.611 1.5332 1.0410 0.9273 kinect kinect2_depth_optical_frame 40" />
<node name="kinect2_rgb_optical_frame" pkg="tf" type="static_transform_publisher" args="-1.904 -1.109 1.611 1.5332 1.0410 0.9273 kinect kinect2_rgb_optical_frame 40" />
<node name="kinect3_depth_optical_frame" pkg="tf" type="static_transform_publisher" args="1.987 -0.783 1.756 -1.6458 -1.0082 1.1499 kinect kinect3_depth_optical_frame 40" />
<node name="kinect3_rgb_optical_frame" pkg="tf" type="static_transform_publisher" args="1.987 -0.783 1.756 -1.6458 -1.0082 1.1499 kinect kinect3_rgb_optical_frame 40" />
<node name="kinect4_depth_optical_frame" pkg="tf" type="static_transform_publisher" args="-0.1735 -1.9762 3.3265 3.1083 0.1532 2.0799 kinect kinect4_depth_optical_frame 40" />
<node name="kinect4_rgb_optical_frame" pkg="tf" type="static_transform_publisher" args="-0.1735 -1.9762 3.3265 3.1083 0.1532 2.0799 kinect kinect4_rgb_optical_frame 40" />
<node name="rviz" pkg="rviz" type="rviz"/>
</launch>
Originally posted by Mikhail K. on ROS Answers with karma: 35 on 2018-07-05
Post score: 0