├── .github
└── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── LICENSE
├── README.md
├── disableAutosuspend.sh
├── installRealSenseROS.sh
└── patches
└── package.diff
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Issue report
3 | about: Create a report to help us improve
4 | title: "[BUG]"
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the issue**
11 | Please describe the issue
12 |
13 | **What version of L4T/JetPack**
14 | L4T/JetPack version:
15 |
16 | **Which Jetson**
17 | Which Jetson exhibits the issue?
18 |
19 | **What version of ROS**
20 | ROS version: (Melodic, Kinetic)
21 |
22 | **What version of librealsense**
23 | librealsense version:
24 |
25 | **Does the RealSense viewer application work correctly?**
26 |
27 |
28 | **To Reproduce**
29 | Steps to reproduce the behavior:
30 | For example, what command line did you run?
31 |
32 | **Expected behavior**
33 | A clear and concise description of what you expected to happen.
34 |
35 | **Additional context**
36 | Add any other context about the problem here.
37 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: "[FEATURE REQUEST]"
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 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 Developer Kits.
3 |
MIT License
4 |
Copyright (c) 2018-20 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 L4T 31.X (Ubuntu 18.04) 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).
13 |
14 | One way to accomplish this is to use the 'installRealSenseSDK' repository on the Github JetsonHacks account (https://github.com/jetsonhacks/installRealSenseSDK). There are also scripts to build the librealsense library itself 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. There are convenience scripts to help do this on the Github JetsonHacks account in the installROS repository (https://github.com/JetsonHacks/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 Jetsons 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 'disableAutosuspend.sh' simply turns off the USB autosuspend setting on the Jetson so that the camera is always available.
25 |
26 |
27 | Releases:
28 | January 2020
29 |
30 | * Initial Release
31 | * L4T 32.3.1
32 | * JetPack 4.3
33 | * Requires librealsense v2.31.0
34 | * Installs RealSense ROS Version = 2.2.11
35 |
36 |
--------------------------------------------------------------------------------
/disableAutosuspend.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 |
--------------------------------------------------------------------------------
/installRealSenseROS.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Install Intel realsense-ros on Jetson Developer Kits
3 | # Copyright (c) 2017-2020 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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------