I am working on a project whose main objective is to check the sensors that can perceive the environment and implement those in gazebo environment. so i am trying to implement lidar sensor and generate point cloud of the outdoor environment. Can anyone guide me how to generate a point cloud of an outdoor environment in Ignition Gazebo Fortress?
$\begingroup$
$\endgroup$
4
-
$\begingroup$ Please edit your post and tell us what you have figured out so far, and what you are stuck on. A simple web search should return many examples of how to configure a lidar sensor in ignition gazebo. $\endgroup$– Mike973Commented Oct 3, 2023 at 14:09
-
$\begingroup$ @Mike973 sorry about not being specific in the pose. Let me elaborate my question. I have a outdoor environment created in gazebo simulation, which at the moment include just human and a square block as an entity. I have lidar publishing the lidar data and lidar points. i am able to see the points in rviz. Now i want to create a point cloud for the given scenario. or create a .pcd file of the scene. so that i can implement some dnn algo. so the question is : how can i create a .pcd file? Thank your for your response. $\endgroup$– Hem92jCommented Oct 3, 2023 at 14:46
-
$\begingroup$ What message type is the lidar node publishing? If it is LaserScan, you're not going to get much of a "cloud" from a 2d lidar and its single plane. $\endgroup$– Mike973Commented Oct 3, 2023 at 16:00
-
$\begingroup$ @Mike973 I am using pointcloud2 msg for 3d lidar. $\endgroup$– Hem92jCommented Oct 4, 2023 at 6:02
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
So you want to take a ros2 PointCloud2 message and write it to a .pcd file.
There is a existing ros1/ros2 package called pcl_ros
. The src code for both is in this github repo, but I don't know the current status of the port to ros2. This package has a ros node named pointcloud_to_pcd
that writes PointCloud2 messages into .pcd files.