0
$\begingroup$

Rosanswers logo

Hi. I am a newbie in ROS. Recently, I start working on the SLAM method(developed by someone else ). I have a node which publishes to the topic /Map. The messages are of type: visualization_msgs/Marker. Example:

x: 0.0703901350498
y: 0.258601367474
z: 0.103628642857

However, the output I wanted is something like point cloud or mesh so that I can import them into simulators like Gazebo. I tried some research online but none of the results answer my question. I wonder if it is possible to convert those Markers into pointcloud or mesh?

Thanks in advance.


Originally posted by rosGSCOP on ROS Answers with karma: 13 on 2016-03-22

Post score: 0


Original comments

Comment by PeteBlackerThe3rd on 2016-03-22:
Can you let us know which type of marker message you are receiving? There are quite a lot of types. If the marker message is points or triangles, then you could make your own node to convert these into point clouds using PCL

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you check the sensor_msgs/PointCloud type you can see that it contains an array of points of type geometry_msgs/Point32 that have member variables x, y and z. So you can write a node that listens to your markers topic, extract the points coordinates, puts them into the PointCloud message and republish that message.


Originally posted by Mehdi. with karma: 3339 on 2016-03-22

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.