Ask Your Question
0

Convert ros markers into pcl or mesh

asked 2016-03-22 02:30:55 -0600

rosGSCOP gravatar image

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.

edit retag flag offensive close merge delete

Comments

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

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2016-03-22 04:36:36 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-03-22 04:36:56 -0600

Mehdi. gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-03-22 02:30:55 -0600

Seen: 197 times

Last updated: Mar 22 '16