The official NASA RMC 2023 repository for LUNABOTICS team, a segment of University of Minnesota Robotics.
We started developing on the Nvidia Jetson TX2 (running Ubuntu 18.04 and ROS 2 Eloquent) but eventually switched over to the newer Nvidia Jetson Orin Nano (running Ubuntu 20.04 and ROS 2 Foxy)
Open this repository in vscode then run ctrl-shift-p and type "Remote-Containers: Reopen in Container". Just press "from dockerfile" and then it will build the container and run it.
When open, run the following commands in the terminal:
source /opt/ros/foxy/setup.sh
colcon build
source install/setup.sh
Make sure to source install/setup.bash
in every new terminal.
Run rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
to install package dependencies.
Run rm -r build install log
to clean your workspace.
To configure Sonarlint & Intellisense for C++ development, run colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=1
. Then, point Sonarlint to the compile_commands.json
file that is created in your build
directory.
ros2 run joy joy_node --ros-args --params-file config/joy_node.yaml
ros2 run navx navx_node
Start the navX Node first with the command above, and then run the script in /scripts that starts the static transform publisher from base_link to imu_link with the command:
./imu_link_transform_publisher.sh
Start the EKF node with ROS parameters:
ros2 run robot_localization ekf_node ekf_filter_node --ros-args --params-file config/ekf.yaml
Follow the instructions outlined here to set up the RealSense depth camera on your machine.
Follow this tutorial to set up Apriltag detection on your machine.
Start Gstreamer H.265 Encoding (On Nvidia Jetson TX2):
gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,width=640,height=480,framerate=30/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=I420" ! omxh265enc bitrate=200000 ! "video/x-h265,stream-format=byte-stream" ! h265parse ! rtph265pay ! udpsink host=127.0.0.1 port=5000
Start Gstreamer H.265 Decoding (On Nvidia Jetson TX2):
gst-launch-1.0 udpsrc port=5000 ! "application/x-rtp,payload=96" ! rtph265depay ! h265parse ! omxh265dec ! nvvidconv ! xvimagesink
Start Gstreamer H.264 Encoding (On Nvidia Jetson Orin Nano):
gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,width=640,height=480,framerate=15/1" ! nvvidconv ! "video/x-raw,format=I420" ! x264enc bitrate=300 tune=zerolatency speed-preset=ultrafast ! "video/x-h264,stream-format=byte-stream" ! h264parse ! rtph264pay ! udpsink host=127.0.0.1 port=5000
Start Gstreamer H.264 Decoding (On Nvidia Jetson Orin Nano):
gst-launch-1.0 udpsrc port=5000 ! "application/x-rtp,payload=96" ! rtph264depay ! h264parse ! avdec_h264 ! nvvidconv ! xvimagesink
Start Gstreamer H.265 Decoding (On Ubuntu Laptop):
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, encoding-name=H265, payload=96 ! rtph265depay ! h265parse ! nvh265dec ! xvimagesink sync=false
Start Gstreamer H.264 Decoding (On Ubuntu Laptop):
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! h264parse ! nvh264dec ! videoflip method=vertical-flip ! xvimagesink sync=false
(Change the /dev/video device to add more webcams, and the port number to stream multiple webcams at once)
Configuring the Nvidia Jetson TX2 for CAN Communication: