Example on Poppy Ergo Jr
This page presents a complete use of ronoco on a poppy ergo jr it uses the resources of learn.e.ros4.pro concerning the Poppy Ergo Jr.
It is necessary to have a ROS installation, a ROS workspace and ronoco to follow this page. Refer to the installation guide if necessary.
Prepare Poppy Ergo Jr
Start by assembling your robot, following the steps for ROS if applicable, then configure your motors
Download the ROS image to flash an SD card. To flash the image to an SD card: + Extract the compressed .zip or .7z file to a folder on the computer + Use the software etcher (or equivalent) + In Etcher, "Flash from file", select the image file and the destination (the SD card) and validate
To connect the robot in Wifi : + Insert the SD card of the robot in question in your workstation and open the partition named boot + Download the file wpa_supplicant.conf in boot and modify it to fill in the right wifi password inside. + Download the file wpa_supplicant.conf in boot and modify it to fill in the right wifi password inside + Create an empty file named .ssh in the same place in the boot. + Type the command sync and cleanly assign the SD card
These 2 files wpa_supplicant.conf and .ssh will be deleted the next time the robot is started, indicating that the Wifi connection request has been accepted. It is therefore normal that you will not find them when you look at the boot content again after the first start of the robot.
In case of problems, it is possible to connect an HDMI display to the Raspberry Pi, the network manager is on the top right.
The Wi-Fi connection also works with Android and iOS mobile access points.
Make sure that the ROS_MASTER_URI
on your workstation and on your poppy point to the same address. If not, modify and source your .bashrc
.
The controller is already on the robot. You can connect directly to the robot and start it. If you have chosen to point the ROS_MASTER_URI
at your workstation, do not forget to run a roscore
before
ssh pi@poppy.local
roslaunch poppy_controllers control.launch
Start MoveIt with a real robot
Install MoveIt then clone the ROS package Poppy Ergo Jr MoveIt Configuration, it contains the code needed to make this robot work with MoveIt :
sudo apt install ros-noetic-moveit
cd $HOME/catkin_ws/src
git clone https://github.com/poppy-project/poppy_ergo_jr_moveit_config.git
cd $HOME/catkin_ws/
catkin_make
source $HOME/.bashrc
Start MoveIt with roslaunch
with the fake_execution
parameter set to false
to connect to the real robot:
roslaunch poppy_ergo_jr_moveit_config demo.launch fake_execution:=false gripper:=true
Rviz should start with a Poppy Ergo Jr in view corresponding to the state of your robot in real time.
⚠️ At this stage, make sure that the posture of your robot in RViz corresponds to the current posture of the real robot: the angles of the motors and the location of the rivets must correspond in every way to your real robot. It is frequent that robots are incorrectly assembled, in this case close MoveIt and go back to the assembly guide step by step to correct before continuing.
Start Ronoco
To launch the project, simply run the following command:
roslaunch ronoco ronoco.launch commander:=arm_and_finger compliant_mode:=/set_compliant
Once all the modules are running go to your localhost:8080 and you will arrive at the ronoco page:
Use Ronoco
For a full understanding of this part it is preferable to have followed the tutorials How to use it and How to create a behaviour tree
The gif below shows a use of Ronoco