ROS 2 is extremely poorly supported, and a bunch of dependency issues can occur including but not limited to the following errors, tested on Ubuntu 20.04 runing Ros2-foxy.
Install from Debian pkg:
sudo apt install ros-$ROS_DISTRO-perception-pclBuild from source:
-
Download source code of Perception-pcl pkg on branch ros2 from -
Create a new ws and build.
Errors~~~~:
Inpointcloud_to_pcd.cpp~~~~: line 56, change#include <tf2_eigen/tf2_eigen.hpp>to#include <tf2_eigen/tf2_eigen.h>.Apply to all the tf2-related dependency-not-found issues.
This package is from foxy-devel branch with grid_map_core pkg migrated from the humble branch. Neither of the original branches can pass compilation on my Ubuntu 20.04 with ROS2 Foxy.
Errors
- Filters/Filters.hpp not found.
sudo apt install ros-$ROS_DISTRO-filtershttps://github.com/GoAMATEUR/ElevationMapping-ROS2
Adapted from ROS1 ver. of https://github.com/ANYbotics/elevation_mapping
cd ~/ros_ws/src
git clone https://github.com/GoAMATEUR/ElevationMapping-ROS2
cd ~/ros_ws && colcon buildThere are 4 config files inside of ./config folder.
-
elevation_map.param.yaml: Define names of frames, elevation mapping behaviors, sensor models, etc.
-
topic_name.yaml: Subscibed / publish topic names.
-
visualization.yaml
-
post_processing.param.yaml
Point cloud data of type PointCloud2 should be published to topic specified in topic_type.yaml.
Estimate of Robot pose w.r.t. global map is required by the node and should be published to specified topic of type PoseWithVarianceStamped.
TF The following TF's should also be published.
-
map (global) -> robot_frame
-
robot_frame -> sensor_frame.
After bringing up sensors and odometry nodes, run:
ros2 launch elevation_mapping_ros2 elevation_mapping.launch.pyTo visualize the elevation map use rviz2 and subscirbe to PointCloud2 topics.
https://github.com/ANYbotics/elevation_mapping ANYbotics
https://github.com/leggedrobotics/elevation_mapping_cupy cupy
elevation map to costmap