MRPT / mvsim

Vehicle and mobile robotics simulator. C++ & Python API. Use it as a standalone application or via ROS 1 or ROS 2
https://mvsimulator.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
251 stars 40 forks source link

Cannot see output pointcloud in RViz #41

Closed omerfarukadastec closed 4 months ago

omerfarukadastec commented 4 months ago

Hi,

I am encountering an error that causes me to not be able to see pointclouds on RViz. I can see pointclouds on the GUI, MVSim is working, but on the terminal I get the following error for each LIDAR.

Screenshot from 2024-02-29 13-22-18

What should I do?

MRPT version: 2.11.5

jlblancoc commented 4 months ago

I'm on the road now and can't check in detail , but almost for sure you need to upgrade mrpt to one of the latest versions, since converting clouds with ring id in ros1 was missing for a few mrpt releases since we focused on ros2 most of the time and forgot it 🙄

omerfarukadastec commented 4 months ago

Hi,

Thanks for the answer & suggestion. I updated MRPT to 2.11.10 from 2.11.5. I updated with building from source because in ppa installation, apt is installing the 2.11.6. I also removed the old one. After installation, I am still getting the same error.

I thought it is about that there are no "toROS" function for CPointsMapXYZIRT. I defined macros for HAVE_POINT_XYZIRT for ROS1 side but in this situation, MVSim cannot be build successfully, it gives the error "error: call of overloaded ‘toROS(const mrpt::maps::CPointsMapXYZIRT&, std_msgs::Header&, sensor_msgs::PointCloud2&)’ is ambiguous".

Is it really about that there are no "toROS" function for CPointsMapXYZIRT? Or did I something wrong?

Thanks in advance.

jlblancoc commented 4 months ago

What about installing mvsim (and hence mrpt automatically) via apt from the ros-noetic-mvsim package??

jlblancoc commented 4 months ago

I can confirm it's still an issue on the latest version of mvsim+mrpt for ROS 1 only. I'll investigate it.

jlblancoc commented 4 months ago

It's now fixed by updates to both, MRPT2 and mvsim:

@omerfarukadastec I checked it works, but please confirm it works for you too: right now this needs to get the latest mrpt2 and mvsim from git and build from sources... I'll soon make new releases for apt installation, but it will take weeks until published by OSRF.

omerfarukadastec commented 4 months ago

Thanks, it works very well. Thanks for your considerations & help.