Skip to content

Sensor Module & Elevation mapping bundle for Robot both in simulation and real world.

License

Notifications You must be signed in to change notification settings

MasterYip/HexapodElevationMapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

合成 1 (0-00-01-13)

HexapodElevationMapping

English | 中文

Sensor Module & Elevation mapping bundle for Robot both in simulation and real world.

TODO:

  • Add namespace option for sensor module

Sensor Modules

HexPercept1

Image 1 Image 2

HexPercept1 use T265 as Inertial Measurement Unit (IMU) and Velodyne VLP-16 Lidar as range sensor.

HexPercept2

Image 1 Image 2

HexPercept2 use T265 as Inertial Measurement Unit (IMU) and RoboSense BPearl as range sensor.

HexPercept3

Image 1 Image 2

HexPercept3 use T265 as Inertial Measurement Unit (IMU) and RoboSense BPearl & D435i(not equipped) as range sensor.


Get Started

Environment Setup

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

Launch Demos

Choose a sensor module and launch the demo.

<!-- HexPercept1 / HexPercept2 / HexPercept3 -->
<arg name="module_name" default="HexPercept1" />
roslaunch hexapod_elevation_mapping demos.launch

User Guide

Understanding modules & module interface

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 to base

The output is the point cloud topic that the elevation mapping node will subscribe to. The topic name is defined in module.launch

Deploy Modules on robots

  1. Use <module_name>.xacro to define the module in your robot xacro file. You can use example.xacro as a template.
  2. Make a copy of demos.launch and modify the relevant parameters, make sure the frame names and topic names are correct.
  3. Launch your robot (gazebo or real world).
  4. Launch the module launch file you have just created.

Notations

Traversibility Estimation

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;
  }

RS-BPearl Lidar IP config

When using default RS-Bpearl firmware:

  • Host IP: 192.168.1.102
  • Net Mask: 255.255.255.0
  • 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


Dependencies

Apt install

sudo apt install ros-$ROS_DISTRO-realsense2-camera ros-noetic-realsense2-description

Git submodules

Cite this repo

@online{hexapod_elevation_mapping_repo,
  author = {Raymon Yip},
  title = {HexapodElevationMapping},
  year = 2024,
  url = {https://github.com/MasterYip/HexapodElevationMapping},
  urldate = {2024-02-25}
}

Acknowledgement

Many thanks to Tipriest for him providing the original solution.

Origin repository:

About

Sensor Module & Elevation mapping bundle for Robot both in simulation and real world.

Resources

License

Stars

Watchers

Forks

Packages

No packages published