pointcloud_to_pcd working in rosrun but not in roslaunch
If I use this works and I get the pcd files:
rosrun pcl_ros pointcloud_to_pcd input:=/velodyne_points
Screen shows:
[ INFO] [1475231616.538308247]: Saving as binary PCD
[ INFO] [1475231616.543897715]: Listening for incoming data on topic /velodyne_points
[ INFO] [1475231616.840383462]: Received 22673 data points in frame velodyne with the following fields: x y z intensity ring
[ INFO] [1475231616.840499468]: Data saved to 1464682245922134.pcd
[ INFO] [1475231616.953555745]: Received 22572 data points in frame velodyne with the following fields: x y z intensity ring
[ INFO] [1475231616.953652475]: Data saved to 1464682246027055.pcd
The rostopic list -v shows:
Published topics:
* /clock [rosgraph_msgs/Clock] 1 publisher
* /rosout [rosgraph_msgs/Log] 2 publishers
* /velodyne_points [sensor_msgs/PointCloud2] 1 publisher
* /rosout_agg [rosgraph_msgs/Log] 1 publisher
Subscribed topics:
* /rosout [rosgraph_msgs/Log] 1 subscriber
* /velodyne_points [sensor_msgs/PointCloud2] 1 subscriber
But if I use the launch file doesnt work:
<launch>
<node name="pc2pcd" pkg="pcl_ros" type="pointcloud_to_pcd">
<remap from="input" to="velodyne_points" />
</node>
</launch>
Rostopic list -v shows exactly the same as before, but screen shows:
... logging to /home/alfonso/.ros/log/0b4428fc-86f9-11e6-aa0f-001a80e17ae0/roslaunch-alfonso-lab-5030.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://alfonso-lab:43424/
SUMMARY
========
PARAMETERS
* /rosdistro: indigo
* /rosversion: 1.11.19
NODES
/
pc2pcd (pcl_ros/pointcloud_to_pcd)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[pc2pcd-1]: started with pid [5048]
However pcd files are not generated.
I have tried changing the launch file to="/velodyne_points" but still doesnt work. Ideas? Thanks in advance
Asked by marilia15 on 2016-09-29 10:18:52 UTC
Comments
Could you give more detail as how "doesn't work"? Are you getting any error messages? Could you attach the output of "rostopic list" in both cases?
Asked by Martin Peris on 2016-09-29 20:05:30 UTC
you are right, I have updated that info in the post. Thank you
Asked by marilia15 on 2016-09-30 05:40:20 UTC
Thank you for updating your question with additional detail. When you run your launch file, is the node that publishes "velodyne_points" running? Does the command "rostopic echo velodyne_points" print any data?
Asked by Martin Peris on 2016-09-30 23:32:31 UTC
Yes, rostopic echo print data. I solved the problem. With rosrun the pcd files are generated in the current folder, but with roslaunch in /home/user/.ros/ folder, and I don't know why. Anyway, I solved it using the parameter prefix in the launch file.
Asked by marilia15 on 2016-10-04 06:41:46 UTC