Giter Site home page Giter Site logo

ros2_orb_slam3's Introduction

Hello there ๐Ÿ‘‹

I am Azmyin, a Doctoral student currently pursuing a Ph.D. program in the Department of MIE at Louisiana State University. Here, I am working on finding novel ways of using semantic data extracted from RGB-D images to improve single-agent and multi-agent localization and mapping feaures. This project is being funded by NSF-NRI grant.

I love to code and deeply appreciate the power it grants to its user.

  • ๐ŸŒฑ Iโ€™m currently learning large-scale collaborative software development in a CSC 7000 level course. Also working on 3D object detection from vision data.

  • ๐Ÿ“ซ How to reach me: Email: [email protected] (valid tentatively till end of 2025)

ros2_orb_slam3's People

Contributors

heblushabus avatar j55blanchet avatar mechazo11 avatar

Stargazers

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

Watchers

 avatar

ros2_orb_slam3's Issues

Running in to the following issue

CMake Error at CMakeLists.txt:167 (add_executable):
Target "mono_node_cpp" links to target "epoxy::epoxy" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?

Colcon build failed "ModuleNotFoundError: No module named 'ament_package'"

I am running into a problem performing colcon build for ORB-SLAM3. I followed the tutorial linked here https://www.youtube.com/watch?v=kQLPupPkQiU because I want to get ROS2 humble on a Jetson Orin which does not have Ubuntu 22.04 yet. The installation of ROS2 and the ZED wrapper is successful. At the end I have an underlay ros2-humble workspace underlay and zed-ws workspace overlay.

Then I proceed to install ros2_orb_slam3 by following the ReadMe. The only thing that I deviate from the instruction is to install Pangolin v0.6 instead of the newer v0.9 due to Ubuntu 20.04 does not have pybind11 2.6 which is what pangolin 0.9 needs. I have finished installing Pangolin.

What I have done for ros2_orb_slam3

which result in the following error
`Starting >>> ros2_orb_slam3
--- stderr: ros2_orb_slam3
Traceback (most recent call last):
File "/home/user/Documents/ros2-humble/install/ament_cmake_core/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py", line 21, in
from ament_package.templates import get_environment_hook_template_path
ModuleNotFoundError: No module named 'ament_package'
CMake Error at /home/user/Documents/ros2-humble/install/ament_cmake_core/share/ament_cmake_core/cmake/ament_cmake_package_templates-extras.cmake:41 (message):
execute_process(/usr/bin/python3
/home/user/Documents/ros2-humble/install/ament_cmake_core/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py
/home/user/Documents/ros2_test/build/ros2_orb_slam3/ament_cmake_package_templates/templates.cmake)
returned error code 1
Call Stack (most recent call first):
/home/user/Documents/ros2-humble/install/ament_cmake_core/share/ament_cmake_core/cmake/ament_cmake_coreConfig.cmake:41 (include)
/home/user/Documents/ros2-humble/install/ament_cmake/share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake:15 (find_package)
/home/user/Documents/ros2-humble/install/ament_cmake/share/ament_cmake/cmake/ament_cmakeConfig.cmake:41 (include)
CMakeLists.txt:26 (find_package)


Failed <<< ros2_orb_slam3 [3.67s, exited with code 1]

Summary: 0 packages finished [14.0s]
1 package failed: ros2_orb_slam3
1 package had stderr output: ros2_orb_slam3
`

Please let me know what might be a potential problem or mistake I made?

Using this repo with a simulated camera?

Hi,
I am using Gazebo with a camera and trying to modify this repo for that.
I have made a similar python node, like the one that reads from the TEST_DATA.

Basically all i did was changing run_py_node() to use images from a subscriber to the ros2 topic that publishes the images.
I validated that the images do arrive by saving them into files.
I made sure to use a setting file with parameters that matches the camera - I took them from the camera *.sdf model file.
However, the ORB-SLAM3: Current Frame shows 'WAITING FOR IMAGES'.
What might be the reason?

Here it the modified python node:

#!/usr/bin/env python3

import sys
import os
import time
from pathlib import Path
import argparse
import yaml
import copy
import numpy as np
import cv2

import rclpy
from rclpy.node import Node
from rclpy.parameter import Parameter

from sensor_msgs.msg import Image
from std_msgs.msg import String, Float64
from cv_bridge import CvBridge, CvBridgeError

class MonoDriver(Node):
    def __init__(self, node_name = "mono_py_node_gazebo"):
        super().__init__(node_name)

        self.declare_parameter("settings_name","Gazebo_cam")
        self.settings_name = str(self.get_parameter('settings_name').value)
        print(f'DEBUG: settings_name = {self.settings_name}')
        # Global variables
        self.node_name = node_name

        self.br = CvBridge()

        self.pub_exp_config_name = "/mono_py_driver/experiment_settings"
        self.sub_exp_ack_name = "/mono_py_driver/exp_settings_ack"
        self.pub_img_to_agent_name = "/mono_py_driver/img_msg"
        self.pub_timestep_to_agent_name = "/mono_py_driver/timestep_msg"
        self.send_config = True

        self.publish_exp_config_ = self.create_publisher(String, self.pub_exp_config_name, 1)
        self.subscribe_exp_ack_ = self.create_subscription(String, self.sub_exp_ack_name, self.ack_callback, 10)
        self.publish_img_msg_ = self.create_publisher(Image, self.pub_img_to_agent_name, 1)
        self.publish_timestep_msg_ = self.create_publisher(Float64, self.pub_timestep_to_agent_name, 1)

        self.image_subscription = self.create_subscription(Image, '/drone0/sensor_measurements/hd_camera/image_raw', self.image_callback, 10)
        self.image_subscription

        self.current_image = None
        self.current_timestep = None

        print(f"MonoDriver initialized, attempting handshake with CPP node")

    def ack_callback(self, msg):
        print(f"Got ack: {msg.data}")

        if(msg.data == "ACK"):
            self.send_config = False

    def handshake_with_cpp_node(self):
        if self.send_config:
            msg = String()
            msg.data = self.settings_name
            self.publish_exp_config_.publish(msg)
            time.sleep(0.01)

    def image_callback(self, msg):
        try:
            self.current_image = self.br.imgmsg_to_cv2(msg, "bgr8")
            self.current_timestep = msg.header.stamp.sec + msg.header.stamp.nanosec * 1e-9
            # Save the image to a file for debugging
            # filename = f"debug_image_{self.current_timestep:.6f}.png"
            # cv2.imwrite(filename, self.current_image)
        except CvBridgeError as e:
            self.get_logger().error(f"Could not convert image: {e}")

    def run_py_node(self):
        if self.current_image is not None and self.current_timestep is not None:
            img_msg = self.br.cv2_to_imgmsg(self.current_image, encoding="passthrough")
            timestep_msg = Float64()
            timestep_msg.data = self.current_timestep

            try:
                self.publish_timestep_msg_.publish(timestep_msg)
                self.publish_img_msg_.publish(img_msg)
                self.get_logger().info(f"Published image at time {self.current_timestep}")

            except CvBridgeError as e:
                self.get_logger().error(f"Could not publish image: {e}")

def main(args = None):
    rclpy.init(args=args)
    n = MonoDriver("mono_py_node_gazebo")
    rate = n.create_rate(20)

    while(n.send_config):
        n.handshake_with_cpp_node()
        rclpy.spin_once(n)

    print(f"Handshake complete")

    try:
        while rclpy.ok():
            print('spinning')
            rclpy.spin_once(n)
            n.run_py_node()
            rate.sleep()
    except KeyboardInterrupt:
        pass

    n.destroy_node()
    rclpy.shutdown()

if __name__=="__main__":
    main()

In addition, I run all this in a docker and uses tmuxiator to run both nodes:

<%

# Other parameters
use_sim_time      = true
%>

attach: false
root: ./
startup_window: ros2_orb_slam
windows:
  - ros2_orb_slam_cpp_node:
      layout:
      panes:
        - bash -c "source /home/ros2_test/install/setup.bash && ros2 run ros2_orb_slam3 mono_node_cpp --ros-args -p node_name_arg:=mono_slam_cpp"
  - ros2_orb_slam_python_node:
      layout:
      panes:
        - bash -c "source /home/ros2_test/install/setup.bash && ros2 run ros2_orb_slam3 mono_driver_node_gazebo.py --ros-args -p settings_name:=Gazebo_cam"

I also made sure that the flow over the image_raw topic is going from the gazebo simulator into the orb_slam node using ROS2 network visualizer:
Screenshot from 2024-06-17 16-11-24

Error while colcon building

  • I ran the command colcon build --symlink-install
  • This was the terminal output

``Starting >>> ros2_orb_slam3
--- stderr: ros2_orb_slam3
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to curl_easy_getinfo@CURL_OPENSSL_4' /usr/bin/ld: /lib/libgdal.so.30: undefined reference to curl_multi_perform@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to `curl_global_init@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_init@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFReadFromUserBuffer@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFGetStrileOffsetWithErr@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_remove_handle@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_addpart@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_version_info@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_name@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_filename@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_info_read@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_setopt@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFDeferStrileArrayWriting@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFForceStrileArrayWriting@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFReadRGBATileExt@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_free@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_data_cb@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFReadRGBAStripExt@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_perform@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_init@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_add_handle@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFGetStrileOffset@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFGetStrileByteCount@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_slist_free_all@CURL_OPENSSL_4'
/usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to `curl_easy_strerror@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFGetStrileByteCountWithErr@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_slist_append@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_poll@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_version@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_setopt@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_data@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_init@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_wait@CURL_OPENSSL_4'
/usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to `curl_global_cleanup@CURL_OPENSSL_4'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/mono_node_cpp.dir/build.make:269: mono_node_cpp] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:168: CMakeFiles/mono_node_cpp.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Failed <<< ros2_orb_slam3 [1.84s, exited with code 2]

Summary: 0 packages finished [2.27s]
1 package failed: ros2_orb_slam3
1 package had stderr output: ros2_orb_slam3
``
Please guide me, I am running this on Ubuntu 22.04 with Ros2 humble

Compilation problems

Hi
I tried to colcon build this repo inside a docker on my laptop - i5 with 8GB RAM, the laptop kept freezing.
I limited the resources to 3GB and 4 processors then got error c++: fatal error: Killed signal terminated program cc1plus compilation terminated. which seems to be connected to insufficient resources.
So I changed to a gaming pc with 30GB and 32 cores and limited the docker container to 'just' 12GB and 16 cores.
15 minutes already, still on 87%.

Should it take so much time and so many resources??

I'm encountering an issue while running colcon build on my system. The system seems to freeze during the build process.

I'm currently using Ubuntu 22.04 with ROS2 Humble. I have followed all the necessary steps and double-checked them multiple times. However, whenever I run colcon build --symlink-install, my system freezes.
What I have done for ros2_orb_slam3
mkdir -p ~/ros2_test/src
cd ~/ros2_test/src
git clone https://github.com/Mechazo11/ros2_orb_slam3.git
cd .. [make sure you are in ~/ros2_ws root directory]
source /opt/ros/humble/setup.bash
colcon build --symlink-install
I run colcon build --symlink-install, my system freezes

Using Real Time

Hello,
I was looking to use this package in order to stream image and camera position real time and from the REAME there isn't a documentation for this repository. I was wondering if you all had any documentation on this repository so I could use it in order to stream images and poses through ros2 humble with a realsense camera, and if so could you provide it?

I was intending to use this wrapper for NeRF with this repo:
https://github.com/javieryu/nerf_bridge

Also, there seems to be some camera pose artifacts on the provided monocular example, however they do not seem to create any data. Why does this happen? ( The arc looking structure above the red square)
image

colcon build failed

/usr/bin/ld: /lib/libgdal.so.30: undefined reference to curl_multi_wait@CURL_OPENSSL_4' /usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to curl_global_cleanup@CURL_OPENSSL_4'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/mono_node_cpp.dir/build.make:231: mono_node_cpp] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:168: CMakeFiles/mono_node_cpp.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Failed <<< ros2_orb_slam3 [0.58s, exited with code 2]

Summary: 0 packages finished [0.72s]
1 package failed: ros2_orb_slam3
1 package had stderr output: ros2_orb_slam3

can you help me please. have no idea why failed

Failed <<< ros2_orb_slam3 [0.58s, exited with code 2]

VSLAM with inertial using Intel D455?

Awesome stuff here! The installation was a breeze. I was wondering how i can go about using ORBSLAM3 using my Intel D455 Camera. This camera has an IMU stream!

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.