🔧 Environment Setup¶
💡 The host IPC is pre-installed with required environments. This guide is for new machine setup only.
📋 Prerequisites¶
💻 Software Environment¶
- Ubuntu 22.04 LTS
- ROS2 Humble
1.1 Install ROS2 Humble¶
Skip if already installed. See ROS2 Installation.
1.2 Install System Dependencies¶
sudo apt update -y
sudo apt-get install ros-humble-moveit -y
sudo apt-get install ros-humble-gripper-controllers -y
sudo apt-get install ros-humble-position-controllers -y
sudo apt-get install ros-humble-joint-state-broadcaster -y
sudo apt-get install ros-humble-joint-trajectory-controller -y
sudo apt-get install ros-humble-xacro -y
sudo apt-get install ros-humble-hardware-interface -y
sudo apt-get install ros-humble-controller-manager -y
sudo apt-get install ros-humble-moveit-plugins ros-humble-moveit-ros-perception -y
sudo apt-get install ros-humble-pinocchio -y
sudo apt-get install libxcb-cursor0 libxcb-xinerama0 libxcb-icccm4 libxcb-keysyms1 libxcb-render-util0 -y
sudo apt-get install can-utils -y
sudo apt-get install git -y
sudo apt-get install python3-vcstool -y
python3 -m pip install python-can -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python3 -m pip install pyside6 -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python3 -m pip install openarmx_arm_driver -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python3 -m pip install casadi -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install numpy==1.26.4 -i https://pypi.tuna.tsinghua.edu.cn/simple
sudo apt update -y
sudo apt-get install ros-humble-moveit -y
sudo apt-get install ros-humble-gripper-controllers -y
sudo apt-get install ros-humble-position-controllers -y
sudo apt-get install ros-humble-joint-state-broadcaster -y
sudo apt-get install ros-humble-joint-trajectory-controller -y
sudo apt-get install ros-humble-xacro -y
sudo apt-get install ros-humble-hardware-interface -y
sudo apt-get install ros-humble-controller-manager -y
sudo apt-get install ros-humble-moveit-plugins ros-humble-moveit-ros-perception -y
sudo apt-get install ros-humble-pinocchio -y
sudo apt-get install libxcb-cursor0 libxcb-xinerama0 libxcb-icccm4 libxcb-keysyms1 libxcb-render-util0 -y
sudo apt-get install can-utils -y
sudo apt-get install git -y
sudo apt-get install python3-vcstool -y
python3 -m pip install python-can -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python3 -m pip install pyside6 -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python3 -m pip install openarmx_arm_driver -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python3 -m pip install casadi -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install numpy==1.26.4 -i https://pypi.tuna.tsinghua.edu.cn/simple
sudo apt update -y
sudo apt-get install ros-humble-moveit -y
sudo apt-get install ros-humble-gripper-controllers -y
sudo apt-get install ros-humble-position-controllers -y
sudo apt-get install ros-humble-joint-state-broadcaster -y
sudo apt-get install ros-humble-joint-trajectory-controller -y
sudo apt-get install ros-humble-xacro -y
sudo apt-get install ros-humble-hardware-interface -y
sudo apt-get install ros-humble-controller-manager -y
sudo apt-get install ros-humble-moveit-plugins ros-humble-moveit-ros-perception -y
sudo apt-get install ros-humble-pinocchio -y
sudo apt-get install libxcb-cursor0 libxcb-xinerama0 libxcb-icccm4 libxcb-keysyms1 libxcb-render-util0 -y
sudo apt-get install can-utils -y
sudo apt-get install git -y
sudo apt install libfuse2
sudo apt-get install python3-vcstool -y
python3 -m pip install python-can -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python3 -m pip install pyside6 -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python3 -m pip install openarmx_arm_driver -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python3 -m pip install websockets -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install casadi -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install numpy==1.26.4 -i https://pypi.tuna.tsinghua.edu.cn/simple
sudo usermod -a -G dialout $USER
sudo chmod +x 'Qnbot HMI Control-1.2.2.AppImage'
1.3 Install CAN Driver (skip if already installed)¶
Note: If you use the Homologous Teleoperation setup, install the PCAN driver. Otherwise, install the KCAN driver.
PCAN Driver Installation¶
Download the PCAN driver package first, then run: PCAN driver package
# extract
tar -xzvf peak-linux-driver-8.20.0.tar.gz -C ~
# install PCAN
cd ~/peak-linux-driver-8.20.0
sudo apt update
sudo apt install -y libpopt-dev
sudo apt install gcc-12 g++-12 -y
sudo sed -i 's/-ftrivial-auto-var-init=zero//g' /lib/modules/$(uname -r)/build/Makefile
make clean
make all
sudo make install
# enable PCAN
sudo modprobe peak_usb
After plugging in the CAN adapter, run ip link show and you should see can0, can1, etc. Next, configure PCAN to start on boot.
## start PCAN on boot
sudo sed -i 's/^blacklist peak_usb$/#blacklist peak_usb/' /etc/modprobe.d/blacklist-peak.conf
echo "peak_usb" | sudo tee -a /etc/modules
sudo depmod -a
KCAN Driver Installation¶
See Install KCAN Driver.
1.4 Build Workspace¶
cd
mkdir -p ~/openarmx_ws/src
cd ~/openarmx_ws/src
Pull source
# clone
git clone https://github.com/openarmx/openarmx_ros2.git
# Fetch the required full optional set
vcs import < openarmx_ros2/openarmx.repos
Install openarmx_can
# amd structure
cd openarmx_ros2
sudo dpkg -i openarmx-can_1.0.0_amd64.deb
# arm structure
cd openarmx_ros2
sudo dpkg -i openarmx-can_1.0.0_arm64.deb
Build
cd ~/openarmx_ws
colcon build
Shell aliases (optional)
echo "alias sc='source install/local_setup.bash'" >> ~/.bashrc
echo "alias cb='colcon build --packages-select'" >> ~/.bashrc
source ~/.bashrc