Installation et démarrage du Turtlebot & OpenManipulator-X
Installation Ubuntu Server
https://emanual.robotis.com/docs/en/platform/turtlebot3/sbc_setup/#sbc-setup
Depuis un ordinateur sous Ubuntu 22.04
- Insérer la carte SD dans le navigateur
- Installer rpi-manager
sudo apt install rpi-imager
- Sélectionner
CHOOSE OS
- autre système Linux (Other general-purpose OS)
- Ubuntu Server 22.04 LTS (64bits)
- Sélectionner
CHOOSE STORAGE
la carte micro SD - Cliquer sur
WRITE
Depuis une VM WSL Ubuntu 22
Configurer la connexion automatique au réseau wifi et donner une IP fixe au robot (dans la plage DHCP autorisée par le routeur) :
- Ejecter et réinsérer la carte SD pour qu'elle se monte
- Créer le fichier suivant :
sudo nano /media/user/writable/etc/netplan/99-hotspot-fablab.yaml
network:
renderer: networkd
ethernets:
eth0:
dhcp4: true
dhcp6: true
optional: true
wifis:
wlan0:
dhcp4: false
dhcp6: false
addresses: [192.168.100.40/24]
gateway4: 192.168.100.1
nameservers:
addresses: [192.168.100.1, 9.9.9.9, 89.234.141.66]
access-points:
fablab:
password: ...
version: 2
- Désactiver la configuration du réseau par cloud-init en créant le fichier suivant :
sudo nano /media/user/writable/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
network: {config: disabled}
Insérer la carte dans le robot, le démarrer assez proche du hotspot wifi configuré, se connecter en ssh depuis l'ordinateur :
- Utiliser l'adresse IP précédemment configurée
ssh ubuntu@192.168.100.40
- mdp :
ubuntu
- changer le mdp par un suffisamment sécurisé
- se connecter en ssh avec le nouveau mdp
- pour lancer des commandes en root utiliser
sudo
avec le même mdp - Ne pas attendre la connexion réseau pour démarrer :
systemctl mask systemd-networkd-wait-online.service
- Désactiver la veille et l'hibernation :
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Installer ROS 2 Humble sans interfaces graphiques (ros-humble-desktop) qui seront lancées sur l'ordinateur externe :
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update && sudo apt upgrade
sudo apt install ros-humble-ros-base ros-dev-tools
source /opt/ros/humble/setup.bash
echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc
Installer le workspace du turtlebot et les dépendances :
sudo apt install python3-argcomplete python3-colcon-common-extensions libboost-system-dev build-essential
sudo apt install ros-humble-hls-lfcd-lds-driver
sudo apt install ros-humble-turtlebot3-msgs
sudo apt install ros-humble-dynamixel-sdk
sudo apt install libudev-dev
mkdir -p ~/turtlebot3_ws/src && cd ~/turtlebot3_ws/src
git clone -b humble-devel https://github.com/ROBOTIS-GIT/turtlebot3.git
git clone -b ros2-devel https://github.com/ROBOTIS-GIT/ld08_driver.git
cd ~/turtlebot3_ws/src/turtlebot3
rm -r turtlebot3_cartographer turtlebot3_navigation2
cd ~/turtlebot3_ws/
echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc
source ~/.bashrc
colcon build --symlink-install --parallel-workers 1
echo 'source ~/turtlebot3_ws/install/setup.bash' >> ~/.bashrc
source ~/.bashrc
Configurer le Port USB pour OpenCR :
sudo cp `ros2 pkg prefix turtlebot3_bringup`/share/turtlebot3_bringup/script/99-turtlebot3-cdc.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger
ID de domain ROS pour la communication DDS :
echo 'export ROS_DOMAIN_ID=30 #TURTLEBOT3' >> ~/.bashrc
source ~/.bashrc
Configurer le modèle du LIDAR :
echo 'export LDS_MODEL=LDS-02' >> ~/.bashrc
source ~/.bashrc
Montage et Configuration des Dynamixels
https://www.classes.cs.uchicago.edu/archive/2022/fall/20600-1/turtlebot_assembly_setup.html
- Installer Arduino IDE :
sudo apt install arduino
- https://emanual.robotis.com/docs/en/parts/controller/opencr10/#install-on-linux
- Connecter OpenCR https://emanual.robotis.com/docs/en/platform/turtlebot3/manipulation/#arduino-ide
- Installer Dynamixel Wizard https://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_wizard2/
Configurer les dynamixel (baud et ID 11 à 15) https://www.classes.cs.uchicago.edu/archive/2022/fall/20600-1/turtlebot_assembly_setup.html#arm-first-time :
- Connect a SINGLE motor (no daisy-chains in the arm) to the OpenCR module and DISCONNECT ALL OTHER MOTORS (the wheel motors!!)
- Open up Dynamixel Wizard 2.0 and update the firmware for that motor by following this tutorial. The arm Dynamixel model is XM430-W350, and the wheel motors are XM430-W210.
- Scan for connected Dynamixels using the “Scan” button on the top menu. If the scan does not turn up any results, you may need to change the scan options in the "Options" menu. By default, an unconfigured arm motor will have ID 1, be on Protocol 2.0, and have a baud rate of 57600 bps.
- Change the ID for the detected motor from 1 to 11/12/13/14/15 (whichever you're doing the procedure for). Click on the “ID” item, and find the ID # you want in the lower right corner. Click it and press “Save”.
- Change the baud rate to 1M (if not already 1M). Click on the “Baud Rate (Bus)” item, and find the 1 Mbps option. Click it and press “Save”.
- Disconnect the motor (both in the wizard by clicking “Disconnect” up top and physically disconnecting from the board) and repeat the steps for the remaining ones
Configuration OpenCR
Pour le Turtlebot : https://emanual.robotis.com/docs/en/platform/turtlebot3/opencr_setup/#opencr-setup
Pour l'OpenManipulator-X : https://emanual.robotis.com/docs/en/platform/turtlebot3/manipulation/#opencr-setup
Dépendances manquantes :
sudo apt install ros-humble-hardware-interface
ros-humble-ros2-control ?
ros-humble-joint-state-publisher ?
Issues :
https://forum.robotis.com/t/ros-2-foxy-openxmanuipaltor-bringup-issues/2142/9
https://github.com/ROBOTIS-GIT/open_manipulator/issues/212
https://github.com/ROBOTIS-GIT/open_manipulator/issues/209