This repo contains the Leo Drive Internship Assingment for localization sub-team.
- Written with ROS2 and C++.
- Package contains 2 ROS2 nodes.
- These are
point_cloud_publisher
andkml_parser_node
.
- These are
- Package has two different folders.
- These are
src
anddata
. data
has 2.pcd
files and 1.kml
file.
- These are
- C++
- PCL 1.2
- ROS2
- GeographicLib
After creating the package in a ROS2 workspace, which node you want to run, below are the necessary commands for both nodes
ros2 run leo_drive_assignment point_cloud_publisher
ros2 run leo_drive_assignment kml_parser_node
- The
point_cloud_publisher
node is written for registering the given point clouds into the one combined point cloud under the same frame. - For matching the right points to the right points, aligning point clouds, combining aligned clouds, the Generalized Iterative Closest Point algorithm is used.
- To apply the algorithm, Point Cloud Library(PCL) is used.
- All given
.pcd
files are written into a PCL Cloud and algorithm are run on this clouds.- Transform matrix between 2 given point clouds is found.
- All given and generated PCL Clouds generated by algorithm is converted into a ROS2 Cloud and visualized on Rviz2.
- Visualisation, transform matrix can be seen below.
- Visualisation, transform matrix can be seen below.
- The
kml_parser_node
node is written for parsing and extracting the path via coordinates in the.kml
files given.- Coordinates in the file were assumed formatted as WGS84. In fact this has no matter, because all coordinates is converted into a local coordinate system via GeographicLib.
- After translation to the x, y, z coordinates, a local coordinate system is implemented which has the origin point as the first point in the line string coordinate array in the
.kml
file. - After finding the local x, y, z coordinates, data is ready for the visualition. Path is published on ROS2 and visualised in Rviz2.
- These results can be seen below.