Unable to control pepper with ros-melodic

473 views
Skip to first unread message

Vignesh Prasad

unread,
Jul 9, 2020, 1:26:06 PM7/9/20
to ROS Sig Aldebaran
I am trying to control Pepper from ubuntu 18.04 with ros-melodic. Since all packages weren't available with sudo apt install, installed whatever was available

sudo apt install ros-melodic-naoqi-bridge-msgs ros-melodic-naoqi-libqi ros-melodic-naoqi-driver ros-melodic-naoqi-libqicore
sudo apt install ros-melodic-pepper-meshes


I have cloned the rest of the packages into my catkin_ws

neo@zion:~$ ls catkin_ws/src/pepper_*
catkin_ws
/src/pepper_dcm_robot:
pepper_dcm_bringup  README
.rst

catkin_ws
/src/pepper_moveit_config:
CHANGELOG
.rst  CMakeLists.txt  config  launch  package.xml  README.rst  test  tuto

catkin_ws
/src/pepper_robot:
pepper_bringup  pepper_description  pepper_robot  pepper_sensors_py

catkin_ws
/src/pepper_virtual:
pepper_control  pepper_gazebo_plugin  README
.md

neo@zion
:~$ ls catkin_ws/src/naoqi_*
catkin_ws
/src/naoqi_bridge:
LICENSE
.txt  naoqi_bridge     naoqi_navigation  naoqi_sensors_py  README.md
naoqi_apps   naoqi_driver_py  naoqi_pose        naoqi_tools       tracks
.yaml

catkin_ws
/src/naoqi_dcm_driver:
CHANGELOG
.rst  CMakeLists.txt  include  package.xml  README.rst  src

and installed whatever dependencies using

neo@zion:~/catkin_ws$ rosdep install --from-paths src --ignore-src -r -y


After source catkin_ws/devel/setp.bash I run the following in different terminals one after the other

To start up the robot:

neo@zion:~$ roslaunch pepper_dcm_bringup pepper_bringup.launch robot_ip:=192.168.100.186 network_interface:=enp7s0
The output of this can be seen here: https://pastebin.com/3VenKwum

Once the robot has started up, I run:

neo@zion:~$ roslaunch naoqi_driver naoqi_driver.launch nao_ip:=192.168.100.186 network_interface:=enp7s0

Using this, I am able to see the images and pointcloud from the robot and also visualize the robot's pose accurately in rviz when I passively move the hands. The output of this command can be seen here: https://pastebin.com/n9S5vN5t


And finally, I run moveit using:

neo@zion:~$ roslaunch pepper_moveit_config moveit_planner.launch

The output of this can be seen here: https://pastebin.com/utPV5yZY


I use the moveit interface to generate a random valid goal configuration (shown in orange) from the MotionPlanning interface and then I first plan it (as seen in the trail).
image

When I click on execute, nothing happens with the robot even though the following messages are displayed in the terminal

[ INFO] [1594216249.619841838]: Execution request received
[ INFO] [1594216253.127858948]: Controller pepper_dcm/RightArm_controller successfully finished
[ INFO] [1594216253.334119901]: Completed trajectory execution with status SUCCEEDED ...
[ INFO] [1594216253.334365776]: Execution completed: SUCCEEDED


There is nothing that gets printed in the terminal where pepper_dcm_bringup is running.


I try to publish the joint trajectories manually first using the topic /pepper_dcm/RightArm_controller/follow_joint_trajectory/goal which does not give any movement on the robot either.
I then try to publish the joint trajectories on the topic /pepper_dcm/RightArm_controller/command which does not give any movement on the robot as well.
There is nothing that gets printed in the terminal where pepper_dcm_bringup is running, even when manually publishing the trajectories on the topics.

I have tried this out with two different pepper robots and it does not work in either case.


The same commands when executed on a VM running ubuntu 16.04 with ros-kinetic seem to work perfectly with both robots moving to the specified location in the moveit interface.


Could this be an issue of the compatibility of the packages with ros-melodic, as I noticed most of the packages and tutorials were aimed for ros-indigo, although they seem to be working with ros-kinetic as well.
Is there any documentation or packages that I might have missed out on for getting this to work in ros-melodic?


Thanks in advance...

Vignesh Prasad

unread,
Jul 10, 2020, 6:50:26 AM7/10/20
to ROS Sig Aldebaran
I was able to find a workaround for this. While going through the motion.cpp file in the package naoqi_dcm_driver, I saw that only in the function writeJoints, the inputs were converted to qi::AnyValue before using it as an argument from motion_proxy_ as shown below.
void Motion::writeJoints(const std::vector <double> &joint_commands)
{
 
//prepare the list of joints
  qi
::AnyValue names_qi = fromStringVectorToAnyValue(joints_names_);

 
//prepare the list of joint angles
  qi
::AnyValue angles_qi = fromDoubleVectorToAnyValue(joint_commands);

 
try
 
{
    motion_proxy_
.async<void>("setAngles", names_qi, angles_qi, 0.2f);
 
}
 
catch(const std::exception& e)
 
{
    ROS_ERROR
("Motion: Failed to set joints nagles! \n\tTrace: %s", e.what());
 
}
}


In all the other functions, the input is being sent as is. So when I modify this to send the input directly as a std::vector it works for me. My function now looks like this:

void Motion::writeJoints(const std::vector <double> &joint_commands)
{
 
try
 
{
    motion_proxy_
.async<void>("setAngles", joints_names_, joint_commands, 0.2f);
 
}
 
catch(const std::exception& e)
 
{
   
ROS_ERROR("Motion: Failed to set joints nagles! \n\tTrace: %s", e.what());
 
}
}

With this, the commands from moveit are being executed on pepper.


Hope this helps others who have the same problem.

Sébastien BARTHELEMY

unread,
Jul 10, 2020, 7:21:31 AM7/10/20
to ROS Sig Aldebaran
On Friday, July 10, 2020 at 12:50:26 PM UTC+2 he wrote:

In all the other functions, the input is being sent as is. So when I modify this to send the input directly as a std::vector it works for me.

This is the proper way of doing, the conversion to qi::AnyValue was unneeded (and apparently harmful, although I don't understand where the regression comes from. Maybe the robot logs would help ?).

Anyway, I think you can send a pull request with this change.

Thank you!

Juliette pepper

unread,
Jul 24, 2020, 5:09:05 AM7/24/20
to ROS Sig Aldebaran
Hi!
Could you show explain how you connect Pepper? I've just install these packages (sudo apt install ros-melodic-naoqi-bridge-msgs ros-melodic-naoqi-libqi ros-melodic-naoqi-driver ros-melodic-naoqi-libqicore
sudo apt install ros-melodic-pepper-meshes)
 but i can't  cloned the rest of the packages into  catkin_ws

Regards!
Message has been deleted

Lukas Probsthain

unread,
Jul 26, 2020, 2:07:40 PM7/26/20
to ROS Sig Aldebaran
Hey,

I just discovered that there is an naoqi_driver fork by Softbank Robotics Research at https://github.com/softbankrobotics-research/naoqi_driver.
It has a badge on the page for melodic that says "passed" - so maybe there is a chance of getting it running in melodic without big changes to the code?

I will investigate more in this topic in the next few weeks due to a project at my university.
A big part of the project is to see how sustainable it is to program Nao or Pepper with Ros in it's current state and with prospect to Ros2.

Lukas

e.rahpe...@gmail.com schrieb am Samstag, 25. Juli 2020 um 10:58:36 UTC+2:
Hi,
as i told you in last email i think you won't be able to use melodic because some packages like naoqi_driver and ... can't be installed in melodic.
--
You received this message because you are subscribed to the Google Groups "ROS Sig Aldebaran" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-aldeba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ros-sig-aldebaran/bcf12c1c-c44f-47e3-bced-52873cfbfe00n%40googlegroups.com.

mb...@aldebaran.com

unread,
Jul 26, 2020, 5:00:42 PM7/26/20
to ROS Sig Aldebaran
Hi all,

Just to give some clarifications on the status of the ROS stack for SoftBank robot.

As Vignesh mentioned, currently only some packages of the stack can be installed as Linux packages (through apt install) for ROS melodic, namely:
  • naoqi_driver
  • naoqi_libqi
  • naoqi_libqicore
  • naoqi_bridge_msgs
  • meshes packages (Pepper and NAO)
Most of the other packages of the stack can easily be compiled by hand for ROS melodic, but some will require extra modifications.

I just discovered that there is an naoqi_driver fork by Softbank Robotics Research at https://github.com/softbankrobotics-research/naoqi_driver.

The naoqi_driver mentioned by Lukas is the fork of the SoftBank Robotics research teams. The naoqi_bridge_msgs repo has also been forked. Those forks have two main differences with the original repos:
  • The geometrical model of Pepper is different, some links and joints have been modified, and the base link of Pepper is located in its base, not in its torso anymore
  • The /joint_angles subscriber expects a different type of JointAnglesWithSpeed message, allowing to set a single speed for the controlled joints or an array of speeds (one per controlled joint)
(It might be safer to work with the original repos in ros-naoqi, the forked ones are adapted to the needs of the research teams and won't necessarily be as stable)

It has a badge on the page for melodic that says “passed” - so maybe there is a chance of getting it running in melodic without big changes to the code?

Compiling naoqi_driver and naoqi_bridge_msgs from source for melodic will work (you can even use the original repos of the ros-naoqi organization for that), as long as you have installed naoqi_libqi, naoqi_libqicore for melodic. Lastly, we experimented a bit with ROS2 for naoqi_driver. We have a working prototype, that will be released in time (not stable enough at the moment).

Hope this helps,
Maxime

Vignesh Prasad

unread,
Jul 27, 2020, 4:02:53 AM7/27/20
to ROS Sig Aldebaran
Hi Elaheh,
For me when I cloned the remaining required repositories from https://github.com/ros-naoqi/ into my catkin_ws, I was able to compile them without much difficulty

On Saturday, July 25, 2020 at 10:58:36 AM UTC+2, Elaheh Rahpeyma wrote:
Hi,
as i told you in last email i think you won't be able to use melodic because some packages like naoqi_driver and ... can't be installed in melodic.

On Fri, Jul 24, 2020 at 1:39 PM Juliette pepper <jltp...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "ROS Sig Aldebaran" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-...@googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages