Sensor Module & Elevation mapping bundle for Robot both in simulation and real world.
TODO:
- Add namespace option for sensor module
HexPercept1 use T265 as Inertial Measurement Unit (IMU) and Velodyne VLP-16 Lidar as range sensor.
HexPercept2 use T265 as Inertial Measurement Unit (IMU) and RoboSense BPearl as range sensor.
HexPercept3 use T265 as Inertial Measurement Unit (IMU) and RoboSense BPearl & D435i(not equipped) as range sensor.
First creat a ros workspace and clone this repository.
cd <your_workspace>/src
git clone --recursive https://github.com/MasterYip/HexapodElevationMapping
# or `git clone --recursive https://github.com/HITSME-HexLab/HexapodElevationMapping`
Install dependencies.
sudo apt install ros-$ROS_DISTRO-realsense2-camera ros-noetic-realsense2-description libpcap-dev
Catkin make.
cd ../../
catkin build hexapod_elevation_mapping -DCMAKE_BUILD_TYPE=Release
source devel/setup.bash
Choose a sensor module and launch the demo.
<!-- HexPercept1 / HexPercept2 / HexPercept3 -->
<arg name="module_name" default="HexPercept1" />
roslaunch hexapod_elevation_mapping demos.launch
In ros package hexapod_elevation_mapping
, Sensor modules are defined in model/modules
folder. Each module has its own launch file and configuration file. In consideration of module reuseability, we try to define a simple module interface.
There are several files in model/modules/<module_name>
folder:
- module.launch: Manage parameters & launch nodes for each sensor module both in simulation and real world.
- example.xacro: Used by demo.launch to spawn only the module in gazebo.
- <module_name>.xacro: Xacro macro file for the module.
- <module_name>.rviz: RViz configuration file for the module.
- 3D model files: 3D model files for the module.
For each module, the input interface is defined in module.launch
:
<arg name="module_name" default="HexPercept1"/>
<arg name="sim" default="true"/>
<arg name="module_installation_tf" default="0 0 0 0 0 0"/>
<arg name="base_frame_name" default="base_link"/>
<arg name="world_frame_name" default="world"/>
- module_name: Name of the module.
- sim: Whether the module is in simulation or real world.
- module_installation_tf: Transformation from the base_link to module.
- base_frame_name: Name of the base tf frame.
- world_frame_name: Name of the world tf frame. Module odom will publish a tf from
world
tobase
The output is the point cloud topic that the elevation mapping node will subscribe to. The topic name is defined in module.launch
- Use <module_name>.xacro to define the module in your robot xacro file. You can use
example.xacro
as a template. - Make a copy of
demos.launch
and modify the relevant parameters, make sure the frame names and topic names are correct. - Launch your robot (gazebo or real world).
- Launch the module launch file you have just created.
If you meet the TF lookup error, please modify the code in
traversability_estimation/src/TraversabilityEstimation.cpp
line 252:
try {
transformListener_.waitForTransform(traversabilityMap_.getMapFrameId(), submapPoint_.header.frame_id, ros::Time(0), ros::Duration(1.0));
transformListener_.transformPoint(traversabilityMap_.getMapFrameId(), submapPoint_, submapPointTransformed);
} catch (tf::TransformException& ex) {
ROS_ERROR("%s", ex.what());
return false;
}
When using default RS-Bpearl firmware:
- Host IP: 192.168.1.102
- Net Mask: 255.255.255.0
elevation_mapping readme correction
-
robot_base_frame_id
(string, default: "/robot")(not base_frame_id)
The id of the robot base tf frame.
-
sensor_processor/cutoff_min_depth
,sensor_processor/cutoff_max_depth
(double, default: min, max of numeric_limits)(not sensor_cutoff_min_depth, sensor_cutoff_max_depth)
The minimum and maximum values for the length of the distance sensor measurements. Measurements outside this interval are ignored.
Temporarily not provided for type:laser
Apt install
sudo apt install ros-$ROS_DISTRO-realsense2-camera ros-noetic-realsense2-description
Git submodules
- grid_map
- elevation_mapping
- kindr
- kindr_ros
- message_logger
- velodyne
- realsense_ros_gazebo
- velodyne_simulator
@online{hexapod_elevation_mapping_repo,
author = {Raymon Yip},
title = {HexapodElevationMapping},
year = 2024,
url = {https://github.com/MasterYip/HexapodElevationMapping},
urldate = {2024-02-25}
}
Many thanks to Tipriest for him providing the original solution.
Origin repository: