ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to run ndt_mapping and ndt_matching using a Laser Scan sensor (/sensor_msgs/LaserScan)

asked 2021-05-10 20:15:29 -0500

privvyledge gravatar image
  • ROS version: Melodic
    • Autoware version: Autoware.AI
    • Autoware.AI GitHub branch: master and 1.14.0
    • Autoware Installation method: Docker (CPU only)
    • ROS Distro: melodic
    • Platform: Ubuntu 18.04 (running on Windows 10 + Windows Subsystem for Linux 2)
    • CPU architecture: x86_64 (Intel Core i7-10750H)
    • Programming languages used: Python, C++, MATLAB

I have successfully run ndt_mapping, ndt_matching, waypoint_saver with Autoware Runtime Manager using the /points_raw topic (/sensor_msgs/PointCloud2 message) in the Sample Moriyame bagfile (link). However, I would now like to run those nodes on my robot. I have a version of my car/robot in simulation (using Gazebo) and one in the lab. It is a small-scale robot (roughly 1/10th the size of an actual car). The issue is that the only sensors available are cameras (Intel Realsense and some CSI cameras), a 2D laser distance sensor (RPLidar), and an IMU sensor (this has not yet been set up). The distance sensor publishes to the /scan topic as /sensor_msgs/LaserScan messages but ndt_matching expects data as /sensor_msgs/PointCloud2 on the /points_raw topic. I have tried converting the /sensor_msgs/LaserScan to /sensor_msgs/PointCloud2 using (here and here) and generated this rosbag (link). However, the laser_geometry package specifies that it is only meant for a stationary object (link) and cannot be used for mobile robots

Since we are gathering data across the time of the scan, it is often important that the chosen target_frame is actually a fixed frame.

This is evident by the unusable /points_raw data in my bagfile. Since I cannot attach files on ROS answers yet, I have attached the scripts used here. I cannot use a GPS sensor to localize since the robot will be indoor and cannot generate a Vector Map or Lanelet2 map from PointClouds.

Since ndt_mapping and ndt_matching are crucial for running Autoware, especially without GPS data, I have the following questions:

  1. How can I run ndt_mapping and ndt_matching directly with /sensor_msgs/LaserScan? Running directly with /sensor_msgs/LaserScan should reduce the overhead and inaccuracies resulting from converting /sensor_msgs/LaserScan to /sensor_msgs/PointCloud2.

  2. How can I accurately convert /sensor_msgs/LaserScan messages to /sensor_msgs/PointCloud2 messages in the correct frame needed for ndt_mapping (I think /base_link)?

  3. Does anybody know any small (and cheap) 2D/3D sensor (small enough to fit on that small) that integrates well with ROS and publishes PointCloud2 data?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-05-19 21:02:19 -0500

sisaha9 gravatar image

If you can use ROS Lunar, they have a pointcloud_to_laserscan package that has a laserscan_to_pointcloud node. Try seeing if that is able to help you. I have used the pointcloud_to_laserscan aspect of it and it works pretty well (though I used it on ROS2 Foxy)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-05-10 20:15:29 -0500

Seen: 339 times

Last updated: May 19 '21