NVIDIA-ISAAC-ROS / isaac_ros_visual_slam

Visual SLAM/odometry package based on NVIDIA-accelerated cuVSLAM
https://developer.nvidia.com/isaac-ros-gems
Apache License 2.0
867 stars 139 forks source link

Could not find the resource 'realsense2_camera #2

Closed patrickpoirier51 closed 2 years ago

patrickpoirier51 commented 2 years ago

Hello,

Trying to run the example with D435 but it is not found

Resloved: We have to run git lfs pull in each Isaac ROS repository Just spent 6 hours finding out... :-(

PLEASE ADD TO THE INSTALLATION

hemalshahNV commented 2 years ago

Thanks for posting the resolution and apologies for the frustration. Did you happen to install git lfs before you cloned the repositories? Could you post the error you ran into? Git LFS brings in binary assets hosted in the repository but the realsense2_camera package itself is not hosted by Git LFS however.

patrickpoirier51 commented 2 years ago

Thanks for fast reply Actually I could not get the camera being recognized with rs-enumerates at first try and it was working at second reload with git lfs pull

But still I couldn't get the realsense lauched so I manually installed the intel realsense ros2 stuff to get it started https://github.com/intel/ros2_intel_realsense

Next, trying to get the rviz running ... not found...as it is not installed on the image ...? And it fails while building --- stderr: rviz_rendering
CMake Error at CMakeLists.txt:40 (find_package): By not providing "Findresource_retriever.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "resource_retriever", but CMake did not find one.

Could not find a package configuration file provided by "resource_retriever" with any of the following names:

resource_retrieverConfig.cmake
resource_retriever-config.cmake

I obviously sourced and ran rosdep: source /opt/ros/foxy/install/setup.bash rosdep install -r --from-paths . --ignore-src --rosdistro foxy -y

Anyway, its not a deal breaker as I will try to export to Mavros

image

hemalshahNV commented 2 years ago

You'll want to run rviz2 on an x86 machine connected to your Jetson. rviz2 is not available for JP4.6 (Ubuntu 18.04) and not in the aarch64 container for Jetson. As for the Realsense camera issues, there have been recent updates to their public release, but we have not run into any issues. Which Realsense are you using?

patrickpoirier51 commented 2 years ago

Hello, Yes, that is what I am trying to do at the moment but I am facing issues with running RVIZ2 on WSL2... so I will probably load it on a clean UBUNTU partition.

I am using a D435i and it seems to be working pretty good.

patrickpoirier51 commented 2 years ago

Well... finally ;-P I built ROS2 on a fresh UBUNTU on my Desktop and added _export ROS_DOMAINID=5 to both system Launched rviz2 and connected to odom

image

AndreV84 commented 2 years ago

it misses the ros realsense package https://github.com/IntelRealSense/realsense-ros/archive/refs/tags/v4.0.0-beta.tar.gz then trying to build it manually it won't find the diagnostics updater package [on Jetson]

    diagnostic_updaterConfig.cmake
    diagnostic_updater-config.cmake

*It turned out that all repos in sources list are for bionic bionic--->focal**

`sudo apt-get install ros-foxy-diagnostic-updater after mnaually reinstalling python3-lark seems it misses rcl viz2 / other packages are installible through apt, I guess e.g .via ros-foxy-desktop or somehow after adding missed rcl packages it starts up


INFO] [launch]: All log files can be found below /home/admin/.ros/log/2021-11-23-13-26-59-510739-nvidia-desktop-29596
[INFO] [launch]: Default logging verbosity is set to INFO
/workspaces/isaac_ros-dev/install/isaac_ros_visual_odometry/share/isaac_ros_visual_odometry/launch/isaac_ros_visual_odometry_realsense.launch.py:16: UserWarning: The parameter 'node_executable' is deprecated, use 'executable' instead
  realsense_camera_node = Node(
[INFO] [component_container-1]: process started with pid [29609]
[INFO] [realsense2_camera_node-2]: process started with pid [29611]
[realsense2_camera_node-2] [INFO] [1637674020.062667934] [RealSenseCameraNode]: RealSense ROS v4.0.0
[realsense2_camera_node-2] [INFO] [1637674020.062829160] [RealSenseCameraNode]: Built with LibRealSense v2.50.0
[realsense2_camera_node-2] [INFO] [1637674020.062852329] [RealSenseCameraNode]: Running with LibRealSense v2.50.0
[realsense2_camera_node-2] [WARN] [1637674020.074839416] [RealSenseCameraNode]: No RealSense devices were found!
[component_container-1] [INFO] [1637674020.170777364] [visual_odometry_launch_container]: Load Library: /workspaces/isaac_ros-dev/install/isaac_ros_visual_odometry/lib/libvisual_odometry_node.so
[component_container-1] [INFO] [1637674020.204717704] [visual_odometry_launch_container]: Found class: rclcpp_components::NodeFactoryTemplate<isaac_ros::visual_odometry::VisualOdometryNode>
[component_container-1] [INFO] [1637674020.207231742] [visual_odometry_launch_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<isaac_ros::visual_odometry::VisualOdometryNode>
[INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/visual_odometry_node' in container '/visual_odometry_launch_container'
hemalshahNV commented 2 years ago

The realsense-ros2 packages should be installed as part of the isaac_ros-dev Docker container in isaac_ros_common/run_dev.sh. If you need to install it outside of the container, you should be able to follow the steps in the Dockerfile there too unless you ran into other difficulties?

AndreV84 commented 2 years ago

@hemalshahNV as per my experience it doesn't get installed to isaac_ros-dev Docker containe /workspaces/isaac_ros-dev

hemalshahNV commented 2 years ago

You need to have the Realsense camera plugged in when launching the Docker container so that the devices are mounted properly.

AndreV84 commented 2 years ago

@hemalshahNV Thank you for letting me know!

GuillaumeLaine commented 2 years ago

Hi @hemalshahNV , I'm also having a similar issue using the Docker container, Realsense D455 and Jetson AGX. I get:

ament_index_python.packages.PackageNotFoundError: "package 'realsense2_camera' not found, 
searching: ['/workspaces/isaac_ros-dev/install/isaac_ros_visual_slam', '/workspaces/isaac_ros-dev/install/isaac_ros_visual_slam_interfaces', '/workspaces/isaac_ros-dev/install/isaac_ros_test', '/workspaces/isaac_ros-dev/install/isaac_ros_image_pipeline', '/workspaces/isaac_ros-dev/install/isaac_ros_stereo_image_proc', '/workspaces/isaac_ros-dev/install/isaac_ros_nvengine', '/workspaces/isaac_ros-dev/install/isaac_ros_nvengine_interfaces', '/workspaces/isaac_ros-dev/install/isaac_ros_image_proc', '/workspaces/isaac_ros-dev/install/isaac_ros_common', '/opt/ros/foxy/install']"

when trying to launch: ros2 launch isaac_ros_visual_slam isaac_ros_visual_slam_realsense.launch.py within the Docker container.

You suggested that realsense2_camera and other realsense-ros2 packages should be installed in the Docker container, but that does not seem to be the case for me neither? I've tried exiting the container, re-plugging the Realsense D455 to the Jetson AGX (working in realsense-viewer), re-entering the container, re-running steps 4. rosdep install & 5. colcon build, sourcing the workspace but I still get that the package is missing? What have I overlooked?

In the meantime I will try to build realsense2_camera manually as done by others.

AndreV84 commented 2 years ago

@GuillaumeLaine u mau also try apt-get install ros-$ROS_DISTRO-realsense2-camera if it is present in apt repositories it will work too. However to build from source is more useable typically.

GuillaumeLaine commented 2 years ago

Thanks for the quick reply @AndreV84 Unfortunately the repo seem to be unavailable for foxy (and galactic) at the moment. I get: E: Unable to locate package ros-foxy-realsense2-camera This seems to be known issue: https://github.com/IntelRealSense/realsense-ros/issues/1814

AndreV84 commented 2 years ago

right However you should be able first to install realsense sdk [ either from apt or from sources] then build workspace with ros realsense node using https://github.com/IntelRealSense/realsense-ros/archive/refs/tags/4.0.4.zip The latter requires LibRealSense v2.50.0

GuillaumeLaine commented 2 years ago

@AndreV84 Thanks a lot! That worked for me. However building the realsense ros package did not work immediately. For future readers, the realsense ros package readme suggests running (for ROS2 wrapper dependencies installation): rosdep install -i --from-path src --rosdistro $_ros_dist --skip-keys=librealsense2 -y That did not work, but running: rosdep install -i --from-path src --rosdistro $ROS_DISTRO --skip-keys "librealsense2 xacro" -y worked instead.

jn128c commented 1 year ago

I`m stuck here... Started all over with fresh image of container, edit config file for build with realsense. It tried to build realsense but failed with errors. Manual install with vcpkg failed at point of kernel patch because of not supported kernel. apt-get doesnt find the repositories. build the source of realsense_SDK faild because of Cmake Ninja which I cant get installed. Could someone explain a method for installing the realsense sdk inside of the container? I´m on Orin DevKit Jetpack 5.0.2 Camera is working outside of container...

Edit: Working now, think I build without kernel patch, use the latest realsense ros and edited the launch script with not passing input_left_camera_frame and input_right... looking really good in first tests