Package with Mapping implementation for Técnico Solar Boat Recruitment Phase 2.

This final version includes pointcloud_to_laserscan_node and mapping_node.
pointcloud_to_laserscan_node Takes as input the sensor_msgs/msg/Pointcloud2 and publishes sensor_msgs/msg/Laserscan in /laser_scan or the desired topic.
mapping_node Has a syncronized callback of sensor_msgs/msg/LaserScan, sensor_msgs/msg/Imu and sensor_msgs/msg/NavSatFix wich uses to:
1.Get Imu and NavSatFix in base frame and initialize map origin if not done yet
2.Use the above in order to publish tf map_frame->base_frame
3.Get Imu and NavSatFix in map_frame
4.Using the above update the map using ray tracing ,log odds ..
5.Publish the updated map
This node isnt yet perfect.There are some isues as refresh rate and odd map formation. It seemed that in the simulator the imu orientation wasnt being updated so I couldnt try if It would work better with a working Imu.
Due to time and management limitations this package was only tested with the sp01 simulator and has the following yet to be implemented:
-
Doxygen documentation
-
Python launchers
-
Params files
-
Quite a lot of "robustness issues" for example what if the gps lat and long wasnt in meters.
Clonning the repo:
cd my_ws/src
git clone git@github.com:JustoDario/TSB-SecondPhase-Mapping.gitRunning pointcloud_to_laserscan_node
ros2 run TSB-SecondPhase-Mapping pointcloud_to_laserscan_nodewith parameters:
ros2 run TSB-SecondPhase-Mapping pointcloud_to_laserscan_node \
--ros-args -p pointcloud_topic:=/auv0/lidar -p laserscan_topic:=/laser_scan -p num_bins:=180Running mapping_node
ros2 run TSB-SecondPhase-Mapping mapping_nodewith parameters:
ros2 run TSB-SecondPhase-Mapping mapping_node \
--ros-args -p map_frame:=map -p base_frame:=base_link -p laser_topic:=/laser_scanParameters for each node and its default values:
mapping_node:
ros__parameters:
map_frame: "map"
base_frame: "base_link"
laser_topic: "/laser_scan"
gps_topic: "/auv0/gps"
map_topic: "/map"
imu_topic: "/auv0/imu"pointcloud_to_laserscan_node:
ros__parameters:
robot_height: 1.2
lidar_height: 1.0
pointcloud_sensor_frame: "lidar_link"
pointcloud_topic: "/auv0/lidar"
laserscan_topic: "/laser_scan"
num_bins: 120
sensor_angle_increment: 0.0
sensor_time_increment: 0.0
sensor_scan_time: 0.0
sensor_range_min: 0.2
sensor_range_max: 120.0
sensor_min_angle: -1.04 //rads
sensor_max_angle: 1.04