Giter VIP home page Giter VIP logo

octomap-ros2's Introduction

OctoMap-ROS2

This repository uses a part of the octomap_mapping ros2 branch.

I recommend utilizing docker to easily configure your environment setting.

Result

Test with custom data, the camera is for visualization purposes only.

FAST-LIO2-OctoMap-Result.mp4

How to use

Requirements

Environment setting

  • ROS2 humble
  • PCL
  • Eigen

Clone this repository. It doesn't matter if the path is not a ros2 workspace.

git clone https://github.com/Taeyoung96/OctoMap-ROS2.git

Make a docker image (For the docker user)

cd docker
docker build -t octomap-ros2:latest .

Make a docker container

When you create a docker container, you need several options to use the GUI and share folders.

First, you should enter the command below in the local terminal to enable docker to communicate with Xserver on the host.

xhost +local:docker

After that, make your own container with the command below.

sudo chmod -R 777 container_run.sh
./container_run.sh <container_name> <image_name:tag>

โš ๏ธ You should change {container_name}, {docker image} to suit your environment.

For example,

 ./container_run.sh octomap_ros2 octomap-ros2:latest

If you have successfully created the docker container, the terminal output will be similar to the below.

output :

Current working directory: /home/taeyoung/Desktop/FAST_LIO_ROS2
================Octomap server ROS2 Docker Env Ready================
root@taeyoung-cilab:~/ros2_ws#

How to run

On /ros2_ws directory,

Build the packages with dependencies at first.

colcon build --packages-select octomap_msgs octomap_ros
source install/setup.bash

Then build all the packages.

colcon build
source install/setup.bash

You need to run the 3D Mapping package (ex. FAST_LIO_ROS2) at the same time.

On the FAST-LIO2 terminal,

ros2 launch fast_lio velodyne.launch.py

For this docker container,

ros2 launch octomap_server octomap_mapping.launch.xml

Map save

ros2 run nav2_map_server map_saver_cli -f ~/ros2_ws/src/ --ros-args --remap map:=/projected_map

octomap-ros2's People

Contributors

taeyoung96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

octomap-ros2's Issues

last config file

In octomap_yonsei-hall-4_mapping.launch_last.xml

<launch>
<node pkg="octomap_server" exec="octomap_server_node" name="octomap_server">
<param name="resolution" value="0.05"/>
<!--  fixed map frame (set to 'map' if SLAM or localization running!)  -->
<param name="frame_id" value="camera_init"/>
<param name="base_frame_id" value="body"/>
<!--  no used -->
<!--  maximum range to integrate (speedup!)  -->
<param name="sensor_model.max_range" value="620.0"/>
<param name="incremental_2D_projection" value="false"/>
<param name="occupancy_min_z" value="0.1"/>
<param name="occupancy_max_z" value="1.0"/>
<!-- ground filtering -->
<param name="filter_ground_plane" value="true"/>
<param name="ground_filter.distance" value="0.04"/>
<param name="ground_filter.angle" value="0.15"/>
<param name="ground_filter.plane_distance" value="1.00"/>
<param name="pointcloud_min_z" value="-3.0"/>
<param name="pointcloud_max_z" value="1.5"/>
<!--  data source to integrate (PointCloud2)  -->
<remap from="cloud_in" to="/cloud_registered"/>
</node>
</launch>

Extra package for OctoMap-ROS2

1. octomap_msgs

# in /src folder
git clone -b ros2 https://github.com/OctoMap/octomap_msgs.git
colcon build --packages-select octomap_msgs

2. octomap_ros

# in /src folder
git clone -b ros2 https://github.com/OctoMap/octomap_ros.git
colcon build --packages-select octomap_ros

3. build

colcon build

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.