Comments (8)
Hi @PANQingrui SLAM on ROS2 can be difficult to implement. RealSense ROS2 users who have attempted it have typically used a combination of slam_toolbox and depthimage_to_laserscan.
The link for slam_toolbox is below. You can select a branch of the tool for a specific ROS2 version. As you are using 22.04, Humble or Iron would likely be the best choice.
https://github.com/SteveMacenski/slam_toolbox
The ROS2 branch of depthimage_to_laserscan is here:
https://github.com/ros-perception/depthimage_to_laserscan/tree/ros2
Alternatively, you could consider using ORB-SLAM with ROS2 and running it in Stereo mode with your D435i stereo depth camera. It has a branch for Humble.
https://github.com/zang09/ORB_SLAM3_ROS2/tree/humble
from realsense-ros.
I'm running into this same issue. For traceability, I was able to get your D435i example (from 2019) running in a Docker container. Needs a little clean-up, but here's the container code:
# SLAM with ROS
FROM ros:kinetic-ros-core
# install ROS
# https://docs.ros.org/en/kinetic/Installation/Ubuntu-Install-Debians.html
RUN apt-get update && apt-get install -y \
software-properties-common \
curl \
&& add-apt-repository universe
# Add the ROS 2 apt repository to your system
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/ros2-latest.list > /dev/null && \
apt-get update -y && apt-get upgrade -y && apt-get install -y \
ros-kinetic-ros-base \
ros-kinetic-rtabmap-ros \
ros-kinetic-robot-localization \
ros-kinetic-imu-filter-madgwick \
ros-kinetic-realsense2-*
# Install rviz
RUN apt-get install -y ros-kinetic-rviz
# install x11 so it can interact with the host
RUN apt-get install -y x11-apps
# install git
RUN apt-get install -y git
# Download the https://github.com/IntelRealSense/realsense-ros
RUN curl -L0 https://github.com/IntelRealSense/librealsense/archive/refs/tags/v2.18.1.zip -o v2.18.1.zip
# unzip the file
RUN apt install -y unzip
RUN unzip v2.18.1.zip
# install python
RUN apt-get install -y python3-pip nano
RUN rosdep init
And the accompanying compose file:
services:
ros_slam:
build:
context: .
dockerfile: Dockerfile
network_mode: "host"
privileged: true
environment:
- DISPLAY=$DISPLAY
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
command : roslaunch realsense2_camera opensource_tracking.launch
When I switched a few things to use Humble, I ran into a lot of missing topics (they would show in ros2 topic list, but a ros2 topic hz would indicate that they weren't actually publishing).
Having a pre-baked solution would be great to have for long-term support of this product. Is it a hardware or driver limitation for getting it to ROS2? I know TF was clearly missing when I was fiddling around in rviz2.
from realsense-ros.
Thanks so much @Forsyth-Creations for sharing your Docker tracking solution!
There is an official ROS2 RealSense SLAM guide that uses depthimage_to_laserscan at the link below, though it is old now and was designed for the obsolete ros2-legacy
wrapper rather than the current ros2-development
ROS2 wrapper.
https://intel.github.io/robot_devkit_doc/pages/rs_slam.html
https://github.com/IntelRealSense/realsense-ros/tree/ros2-legacy
The guide uses both a 400 Series camera and the RealSense T265 Tracking Camera, so if you do not have a T265 then you would also have to skip the T265 parts of the instructions and use the rs_launch.py launch file instead of the guide's suggested rs_t265_and_d400.launch.py
Another possible option is the ROS2 wrapper for the Kimera 'semantic SLAM' tool.
https://github.com/MIT-SPARK/Kimera-VIO-ROS2
https://www.youtube.com/watch?v=Zjevg5wQTdI
For a more modern ROS2 SLAM solution that is compatible with RealSense and is an out of the box solution, you could look at SLAMcore.
https://www.imveurope.com/press-releases/slamcore-teams-realsense-provide-out-box-slam-algorithms
from realsense-ros.
Hi @PANQingrui and @Forsyth-Creations Do either of you require further assistance with this case, please? Thanks!
from realsense-ros.
Hi @PANQingrui and @Forsyth-Creations Do either of you require further assistance with this case, please? Thanks!
Hi Marty, thank you for your suggestions. I haven't tried your suggestions yet, but I just checked this issue "#2992", and it seems to be similar to my needs.
I will try ORB-SLAM first, and thank you for your help again! I will update here if further assistance is needed.
from realsense-ros.
You are very welcome, @PANQingrui - good luck!
from realsense-ros.
Hi @PANQingrui Do you require further assistance with this case, please? Thanks!
from realsense-ros.
Case closed due to no further comments received.
from realsense-ros.
Related Issues (20)
- Can't not display compressed RGB/Depth in RViz HOT 6
- `rgb_camera.color_profile` -> `rgb_camera.profile` ? HOT 2
- Announcement: RealSense ROS wrapper 4.55.1 now available HOT 10
- Cannot Publish Pointclouds on ROS Noetic under Ubuntu 20.04 on an RPi 4 HOT 4
- Can D435 or D455 be used in a MOOS environment? HOT 3
- How to calibrate D435 using checkerboard underwater? HOT 3
- Current Options for Visual Odometry with T265
- Prefixing camera frames with namespaces in the tf_static topic HOT 12
- ROS2 Lifecycle node HOT 2
- D455 camera cannot get imu msg from rostopic HOT 6
- The requested device with serial number f0232572 is NOT found. Will Try again. L515 HOT 2
- Error with "roslaunch realsense2_camera opensource_tracking.launch" HOT 30
- Connect to device via physical ID HOT 5
- The ROS wrapper for RealSense D435 does not starts, it gives ERRORS - D435+ROS Noetic+Ubuntu 20.04 HOT 35
- D455 camera cannot get imu msg from rostopic HOT 15
- Unable to build from source since PR #3125 HOT 33
- cant change color profile HOT 9
- When can a version with "rolling" support be released? HOT 1
- Failed to start the depth stream with D415 after updating to RealSense ROS Wrapper Version 4.55.1 HOT 6
- fails to build from sources HOT 21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realsense-ros.