├── setupNano.sh ├── patches └── package.diff ├── LICENSE ├── README.md └── installRealSenseROS.sh /setupNano.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Disable USB autosuspend 3 | sudo sed -i '$s/$/ usbcore.autosuspend=-1/' /boot/extlinux/extlinux.conf 4 | # /bin/ required for echo to work correctly in /bin/sh file 5 | /bin/echo -e "\e[1;32mPlease reboot for changes to take effect.\e[0m" 6 | 7 | -------------------------------------------------------------------------------- /patches/package.diff: -------------------------------------------------------------------------------- 1 | diff --git a/realsense2_camera/package.xml b/realsense2_camera/package.xml 2 | index 83a8ab3..06c6f3e 100644 3 | --- a/realsense2_camera/package.xml 4 | +++ b/realsense2_camera/package.xml 5 | @@ -25,7 +25,6 @@ 6 | tf 7 | ddynamic_reconfigure 8 | diagnostic_updater 9 | - librealsense2 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 JetsonHacks 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # installRealSenseROS 2 | Install the realsense-ros library on NVIDIA Jetson Nano Developer Kit. 3 |
MIT License 4 |
Copyright (c) 2018-19 JetsonHacks 5 | 6 | The installRealSenseROS script will install librealsense and realsense_camera as ROS packages. These scripts have been tested with a RealSense D435, D435i and T265 cameras. 7 | 8 | Note that the RealSense ROS wrapper is for ROS Kinetic, but the Jetson Nano is ROS Melodic. Please note any issues that you encounter. 9 | 10 | This is the third step of a three step process. 11 | 12 | The first step requires the installation of librealsense (version 2). For the D4XX cameras, librealsense requires a modified kernel which modularizes uvcvideo and adds the RealSense video modes to the uvcvideo driver among other things. 13 | 14 | One way to accomplish this is to use the 'installLibrealsense' repository on the Github JetsonHacksNano account (https://github.com/JetsonHacksNano/installLibrealsense). There are also scripts to build the librealsense library itself, and convenience scripts to rebuild the kernel if need be. Note: You will need to use the matching version of librealsense which corresponds to the RealSense ROS wrapper. See release notes below. 15 | 16 | The second step is to install ROS on the Jetson Nano. There are convenience scripts to help do this on the Github JetsonHacksNano account in the installROS repository (https://github.com/JetsonHacksNano/installROS). Note that the repository installs ros-base, if other configurations such as ros-desktop are desired, the scripts can do that through the command line parameters. You may want to install rviz. Note: realsense-ros officially only supports ROS Kinetic presently, the Jetson Nano runs ROS Melodic. While we haven't run into any issues running the library under ROS Melodic, be aware that there may be differences. 17 | 18 | This repository, the third step, is to install realsense-ros. The script installRealSenseROS.sh in this directory will install realsense-ros and dependencies in a Catkin Workspace. 19 | 20 | To install: 21 | 22 | $ ./installRealSenseROS.sh \ 23 | 24 | The script 'setupNano.sh' simply turns off the USB autosuspend setting on the Jetson Nano so that the camera is always available. 25 | 26 | 27 |

Releases:

28 | December 2019 29 | 30 | * L4T 32.3.1 31 | * JetPack 4.3 32 | * Requires librealsense v2.31.0 33 | * Installs RealSense ROS Version = 2.2.11 34 | 35 | October 2019 36 | 37 | * L4T 32.2.1 38 | * JetPack 4.2.1 39 | * Requires librealsense v2.25.0 40 | * Installs RealSense ROS Version = 2.2.8 41 | 42 | July 2019 43 | * L4T 32.2 44 | * JetPack 4.2.1 45 | * Expects librealsense v2.24.0 46 | * Installs RealSense ROS Version = 2.2.7 47 | 48 | June 2019 49 | * L4T 32.1.0 50 | * JetPack 4.2 51 | * Expects librealsense v2.22.0 52 | * Installs RealSense ROS Version = 2.2.6 53 | 54 | 55 | -------------------------------------------------------------------------------- /installRealSenseROS.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Install Intel realsense-ros on Jetson Nano Developer Kit 3 | # Copyright (c) 2017-2019 Jetsonhacks 4 | # MIT License 5 | # Usage: 6 | # ./installRealSenseROS.sh 7 | # If is omitted "~/catkin_ws" assumed 8 | # ROS should already be installed, and a catkin workspace created 9 | # Figure out where to install realsense-ros 10 | # Save the directory we're installing from: 11 | INSTALL_DIR=$PWD 12 | # This version uses librealsense v2.31.0 13 | REALSENSE_ROS_VERSION=2.2.11 14 | # Now go get ready to install realsense-ros 15 | source /opt/ros/melodic/setup.bash 16 | # In L4T 32.3.1, opencv4 contains the opencv installation 17 | # Make a symbolic link 18 | cd /usr/include 19 | sudo ln -s opencv4 opencv 20 | cd $INSTALL_DIR 21 | 22 | DEFAULTDIR=catkin_ws 23 | CLDIR="$1" 24 | if [ ! -z "$CLDIR" ]; then 25 | DEFAULTDIR="$CLDIR" 26 | fi 27 | # Check to see if qualified path already 28 | if [ -d "$DEFAULTDIR" ] ; then 29 | echo "Fully qualified path" 30 | else 31 | # Have to add path qualification 32 | DEFAULTDIR=$HOME/$DEFAULTDIR 33 | fi 34 | echo "DEFAULTDIR: $DEFAULTDIR" 35 | 36 | 37 | 38 | if [ -e "$DEFAULTDIR" ] ; then 39 | echo "$DEFAULTDIR exists" 40 | CATKIN_WORKSPACEHIDDEN=$DEFAULTDIR/.catkin_workspace 41 | CATKIN_BUILD_WORKSPACEHIDDEN=$DEFAULTDIR/.catkin_tools 42 | if [ -e "$CATKIN_WORKSPACEHIDDEN" ] || [ -e "$CATKIN_BUILD_WORKSPACEHIDDEN" ] ; then 43 | # This appears to be a Catkin_Workspace 44 | echo "Found catkin workspace in directory: $DEFAULTDIR" 45 | else 46 | echo "$DEFAULTDIR does not appear to be a Catkin Workspace." 47 | echo "The directory does not contain the hidden file .catkin_workspace or .catkin_tools." 48 | echo "This does not appear to be a proper ROS installation." 49 | echo "Terminating Installation." 50 | exit 1 51 | fi 52 | else 53 | echo "Catkin Workspace named $DEFAULTDIR does not exist" 54 | echo "Please create a Catkin Workspace before installation" 55 | echo "Terminating Installation" 56 | exit 1 57 | fi 58 | if [ "${DEFAULTDIR: -1}" != "/" ] ; then 59 | DEFAULTDIR=$DEFAULTDIR/ 60 | fi 61 | 62 | INSTALLDIR="$DEFAULTDIR"src 63 | if [ -e "$INSTALLDIR" ] ; then 64 | echo "Installing realsense-ros in: $INSTALLDIR" 65 | else 66 | echo "$INSTALLDIR does not appear to be a source of a Catkin Workspace" 67 | echo "The source directory src does not exist" 68 | echo "Terminating Installation" 69 | exit 1 70 | fi 71 | 72 | echo "Starting installation of realsense-ros" 73 | 74 | cd $INSTALLDIR 75 | 76 | # Update the dependencies database 77 | rosdep update 78 | echo "Cloning Intel ROS realsense package" 79 | # Prerequisite: ddynamic_reconfigure 80 | git clone https://github.com/pal-robotics/ddynamic_reconfigure 81 | git clone https://github.com/IntelRealSense/realsense-ros.git 82 | cd realsense-ros 83 | git checkout $REALSENSE_ROS_VERSION 84 | # Remove the librealsense2 package requirement in package.xml 85 | patch -p1 < $INSTALL_DIR/patches/package.diff 86 | cd ../.. 87 | echo $PWD 88 | echo "Making Intel ROS realsense-ros" 89 | sudo rosdep -y install --from-paths src --ignore-src --rosdistro melodic 90 | if [ -e "$CATKIN_WORKSPACEHIDDEN" ] ; then 91 | echo "catkin_make starts" 92 | catkin_make 93 | echo "realsense-ros Package installed" 94 | elif [ -e "$CATKIN_BUILD_WORKSPACEHIDDEN" ] ; then 95 | echo "catkin_build starts" 96 | catkin build 97 | echo "realsense-ros Package installed" 98 | else 99 | echo "Error: Could not decide to use catkin_make or catkin build" 100 | echo "Aborting..." 101 | fi 102 | --------------------------------------------------------------------------------