NV 已经开源Jetbot 硬件组件+小车3D模型+软件代码(非Jetbot Image):
1、小车框架实体是通过3D 打印的;
2、硬件组件 组件列表 通过亚马逊网站上购买
3、软件开源代码 Github NV Jetbot_ros
4、安装步骤参考说明 硬件安装HW Setup
软件配置过程及运行
步骤1、安装ROS Melodic (Enter Nano shell)
若无法找到Package:ros-melodic-ros-base, 则需检查ROS repository是否添加?
# enable all Ubuntu packages:
sudo apt-add-repository universe
sudo apt-add-repository multiverse
sudo apt-add-repository restricted
# add ROS repository to apt sources
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116
# install ROS Base
sudo apt-get update
sudo apt-get install ros-melodic-ros-base
# add ROS paths to environment
sudo sh -c 'echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc'
步骤2、安装Adafruit Libraries
(These Python libraries from Adafruit support the TB6612/PCA9685 motor drivers and the SSD1306 debug OLED)
# pip should be installed
sudo apt-get install python-pip
# install Adafruit libraries
pip install Adafruit-MotorHAT
pip install Adafruit-SSD1306
获取用户对I2C总线操作权限 (ex. nvidia login name)
$sudo usermod -aG i2c $USER
sudo usermod -aG i2c nvidia
Reboot the system for the changes to take effect(重启系统确保更改I2C等有效)
步骤3、创建catkin工作目录
Create a ROS Catkin workspace to contain our ROS packages:
# create the catkin workspace
mkdir -p ~/work/catkin_ws/src
cd ~/work/catkin_ws
catkin_make
# add catkin_ws path to bashrc
sudo sh -c 'echo "source ~/work/catkin_ws/devel/setup.bash" >> ~/.bashrc'
Note: out of personal preference, my catkin_ws is created as a subdirectory under ~/workspace
#Close and open a new terminal window. Verify that your catkin_ws is visible to ROS:
$ echo $ROS_PACKAGE_PATH
/home/nvidia/workspace/catkin_ws/src:/opt/ros/melodic/share
步骤4、编译安装Build jetson-inference
Clone and build the jetson-inference
repo:
由于GFW原因,无法从nvidia.box.com 下载jetson-inference内容,我是通过Windows翻|墙先下载下来,再把注释掉wget而是直接
# git and cmake should be installed
sudo apt-get install git cmake
# clone the repo and submodules
cd ~/workspace
git clone -b onnx https://github.com/dusty-nv/jetson-inference
cd jetson-inference
git submodule update --init
# build from source
mkdir build
cd build
cmake ../
make
# install libraries
sudo make install
步骤4、编译ros_deep_learning
Clone and build the ros_deep_learning
repo:
# install dependencies
sudo apt-get install ros-melodic-vision-msgs ros-melodic-image-transport ros-melodic-image-publisher
# clone the repo
cd ~/work/catkin_ws/src
git clone https://github.com/dusty-nv/ros_deep_learning
# make ros_deep_learning
cd ../ # cd ~/work/catkin_ws
catkin_make
# confirm that the package can be found
$ rospack find ros_deep_learning
/home/nvidia/works/catkin_ws/src/ros_deep_learning
步骤5、测试Testing JetBot
Step1. 启动“roscore”,检查各个模块在ROS 种工作,打开新的终端,运行“roscore”, 如下图片说明ROS 正常工作,否则ROS 未处于工作状态,请检查前面步骤是否完整 ?
$ roscore
image.png
Step2. 检查树莓派Raspberry Pi [Camera v2]运行是否正常
运行指令可打开相机预览功能以验证相机是否安装成功(若不成功会有类似I2C或Gstream 错误)
$nvgstcapture-1.0 -m 2
网友评论