Giter VIP home page Giter VIP logo

naoqi_dcm_driver's Introduction

NAOqi DCM Driver

The hardware interface to connect to Nao, Romeo, and Pepper robots. This is the new version of nao_dcm_driver that is now common for all robots. You can control the robot either by calling DCM commands, or using ALMotion (by default). When calling DCM commands, you can achieve faster control frequency but it can make the robot shaking because of the concurrence between DCM and ALMotion. Especially when using DCM, please be careful and use it at your own risks.

What it does

The package allows to control a robot from ROS, while communicating with Naoqi. The package is inspired by nao_dcm_driver, however it does not require NAOqi SDK anymore and rather based on naoqi_libqi and naoqi_libqicore. The package is more generic, and it works with any of Nao, Romeo, and Pepper robots. It can run on a remote PC or locally on a robot (after compiling on OpenNAO VM, deploying to your robot, and using robot_ip:=127.0.0.1).

How to use

The package should be used via the following wrapper-packages depending on your robot (please, follow the links to get instructions on installation and usage):

naoqi_dcm_driver's People

Contributors

awesomebytes avatar mikaelarguedas avatar nlyubova avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

naoqi_dcm_driver's Issues

Cant launch the dcm driver with pepper

Hello I'm sorry if I'm making some obvious error but I'm new with ROS.
currently I'm trying to set up MoveIt! for Pepper and was following the guides found at the ROS-Wiki.
AFAIK I should first start the dcm driver before using MoveIt!.
However, every time I try to launch dcm with:
roslaunch pepper_dcm_bringup pepper_bringup.launch
I get the following error message:

[ERROR] [1510231829.922299911]: Motion: Failed to get robot body names!
	Trace: 	ALMotion::getBodyNames
	Could not parse "LArmRArm" as a valid joint name, chain name or "Body"

As for the details of my Installation, I'm currently using ROS-Indigo on a Xubuntu 14.04 VM.
Pepper's Naoqi version is 2.5.5.5 and I tried using both the precompiled version of the dcm driver, as well as one I compiled w/ catkin on the VM.
As far as I can tell there seems to be a problem with a missing separator between to strings in a string-vector.

Could not parse "LArmRArm" as a valid joint name, chain name or "Body" in pepper_bringup.launch

Reported in https://groups.google.com/d/msg/ros-sig-aldebaran/Cu18gewN41Y/xWXu9hSqAwAJ by Ariel Bistritsky, reproduced by Josef Gerauer-Aigner.

I tried to launch the pepper_bringup.launch but I hed the next error:

[ERROR] [1508861764.274247278]: Motion: Failed to get robot body names!
Trace: ALMotion::getBodyNames
Could not parse "LArmRArm" as a valid joint name, chain name or "Body"
[naoqi_dcm_driver-2] process has died [pid 24774, exit code -11, cmd /opt/ros/indigo/lib/naoqi_dcm_driver/naoqi_dcm_driver __name:=naoqi_dcm_driver __log:=/home/peppercom/.ros/log/9cba558c-b8cf-11e7-abad-d8cb8a065d13/naoqi_dcm_driver-2.log].
log file: /home/peppercom/.ros/log/9cba558c-b8cf-11e7-abad-d8cb8a065d13/naoqi_dcm_driver-2*.log

does anyone else had the same problem? how can I fix it?

Happens on the the Debian package on ROS Indigo. Worked around by recompiling the dcm_driver.

low FPS on Depth Camera

I am using a Pepper Robot and running:

roslaunch pepper_dcm_bringup pepper_bringup.launch robot_ip:=192.168.12.68
roslaunch naoqi_driver naoqi_driver.launch nao_ip:=192.168.12.68

It runs okay however I am getting a really low FPS rate with the depth camera, about 0.7. Is there a way to make it higher?

Also I am getting the following warning:

[ WARN][/pepper_robot/camera/camera_nodelet_manager][1646387899.934485100]: TF2 exception:
Lookup would require extrapolation into the future.  Requested time 1646387899.933206874 but the latest data is at time 1646387899.224573674, when looking up transform from frame [CameraDepth_optical_frame] to frame [CameraTop_optical_frame]

Problems in controlling Pepper with ros-melodic

I had initially posted this issue under pepper_dcm_robot (ros-naoqi/pepper_dcm_robot#6) but found that the issue was due to the naoqi_dcm_driver package so I'm posting the problem and one workaround that worked for me here.

ISSUE

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 with both robots moving to the specified location in the moveit interface.

WORKAROUND

While going through the motion.cpp file, 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.

naoqi_dcm_drivers does not compile on armhf

http://build.ros.org/view/Ibin_arm_uThf/job/Ibin_arm_uThf__naoqi_dcm_driver__ubuntu_trusty_armhf__binary/67/console

04:09:24 [100%] Building CXX object CMakeFiles/naoqi_dcm_driver.dir/src/motion.cpp.o
04:09:24 /usr/bin/arm-linux-gnueabihf-g++   -DLIBQI_VERSION=23 -DROSCONSOLE_BACKEND_LOG4CXX -DROS_PACKAGE_NAME=\"naoqi_dcm_driver\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DNDEBUG -D_FORTIFY_SOURCE=2  -I/tmp/binarydeb/ros-indigo-naoqi-dcm-driver-0.0.2/include -I/opt/ros/indigo/include    -o CMakeFiles/naoqi_dcm_driver.dir/src/motion.cpp.o -c /tmp/binarydeb/ros-indigo-naoqi-dcm-driver-0.0.2/src/motion.cpp
04:11:02 Linking CXX executable devel/lib/naoqi_dcm_driver/naoqi_dcm_driver
04:11:02 /usr/bin/cmake -E cmake_link_script CMakeFiles/naoqi_dcm_driver.dir/link.txt --verbose=1
04:11:02 /usr/bin/arm-linux-gnueabihf-g++   -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DNDEBUG -D_FORTIFY_SOURCE=2     CMakeFiles/naoqi_dcm_driver.dir/src/robot_driver.cpp.o CMakeFiles/naoqi_dcm_driver.dir/src/robot.cpp.o CMakeFiles/naoqi_dcm_driver.dir/src/tools.cpp.o CMakeFiles/naoqi_dcm_driver.dir/src/diagnostics.cpp.o CMakeFiles/naoqi_dcm_driver.dir/src/memory.cpp.o CMakeFiles/naoqi_dcm_driver.dir/src/dcm.cpp.o CMakeFiles/naoqi_dcm_driver.dir/src/motion.cpp.o  -o devel/lib/naoqi_dcm_driver/naoqi_dcm_driver -rdynamic /opt/ros/indigo/lib/libtf.so /opt/ros/indigo/lib/libtf2_ros.so /opt/ros/indigo/lib/libactionlib.so /opt/ros/indigo/lib/libmessage_filters.so /opt/ros/indigo/lib/libtf2.so /opt/ros/indigo/lib/libcontroller_manager.so /opt/ros/indigo/lib/librealtime_tools.so -ltinyxml /opt/ros/indigo/lib/libclass_loader.so -lPocoFoundation -ldl /opt/ros/indigo/lib/libroslib.so /opt/ros/indigo/lib/libqi.so /opt/ros/indigo/lib/libqicore.so /opt/ros/indigo/lib/libroscpp.so -lboost_signals -lboost_filesystem /opt/ros/indigo/lib/librosconsole.so /opt/ros/indigo/lib/librosconsole_log4cxx.so /opt/ros/indigo/lib/librosconsole_backend_interface.so -llog4cxx -lboost_regex /opt/ros/indigo/lib/libxmlrpcpp.so /opt/ros/indigo/lib/libroscpp_serialization.so /opt/ros/indigo/lib/librostime.so -lboost_date_time /opt/ros/indigo/lib/libcpp_common.so -lboost_system -lboost_thread -lpthread -lconsole_bridge /opt/ros/indigo/lib/libqi.so /opt/ros/indigo/lib/libqicore.so /opt/ros/indigo/lib/libroscpp.so -lboost_signals -lboost_filesystem /opt/ros/indigo/lib/librosconsole.so /opt/ros/indigo/lib/librosconsole_log4cxx.so /opt/ros/indigo/lib/librosconsole_backend_interface.so -llog4cxx -lboost_regex /opt/ros/indigo/lib/libxmlrpcpp.so /opt/ros/indigo/lib/libroscpp_serialization.so /opt/ros/indigo/lib/librostime.so -lboost_date_time /opt/ros/indigo/lib/libcpp_common.so -lboost_system -lboost_thread -lpthread -lconsole_bridge -Wl,-rpath,/opt/ros/indigo/lib: 
04:11:05 /opt/ros/indigo/lib/libqi.so: undefined reference to `boost::atomics::detail::lockpool::get_lock_for(void const volatile*)'
04:11:05 collect2: error: ld returned 1 exit status
04:11:05 make[4]: *** [devel/lib/naoqi_dcm_driver/naoqi_dcm_driver] Error 1
04:11:05 make[4]: Leaving directory `/tmp/binarydeb/ros-indigo-naoqi-dcm-driver-0.0.2/obj-arm-linux-gnueabihf'
04:11:05 make[3]: *** [CMakeFiles/naoqi_dcm_driver.dir/all] Error 2
04:11:05 make[3]: Leaving directory `/tmp/binarydeb/ros-indigo-naoqi-dcm-driver-0.0.2/obj-arm-linux-gnueabihf'
04:11:05 make[2]: *** [all] Error 2
04:11:05 make[2]: Leaving directory `/tmp/binarydeb/ros-indigo-naoqi-dcm-driver-0.0.2/obj-arm-linux-gnueabihf'
04:11:05 dh_auto_build: make -j1 returned exit code 2
04:11:05 make[1]: *** [override_dh_auto_build] Error 2
04:11:05 make[1]: Leaving directory `/tmp/binarydeb/ros-indigo-naoqi-dcm-driver-0.0.2'
04:11:05 make: *** [build] Error 2
04:11:05 dpkg-buildpackage: error: debian/rules build gave error exit status 2
04:11:05 E: Building failed
04:11:05 Traceback (most recent call last):
04:11:05   File "/tmp/ros_buildfarm/ros_buildfarm/binarydeb_job.py", line 133, in build_binarydeb
04:11:05     subprocess.check_call(cmd, cwd=source_dir)
04:11:05   File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
04:11:05     raise CalledProcessError(retcode, cmd)
04:11:05 subprocess.CalledProcessError: Command '['apt-src', 'build', 'ros-indigo-naoqi-dcm-driver']' returned non-zero exit status 1
04:11:05 # END SUBSECTION
04:11:05 
04:11:05 --------------------------------------------------------------------------------------------------
04:11:05 `apt-src build ros-indigo-naoqi-dcm-driver` failed.
04:11:05 This is usually because of an error building the package.
04:11:05 The traceback from this failure (just above) is printed for completeness, but you can ignore it.
04:11:05 You should look above `E: Building failed` in the build log for the actual cause of the failure.
04:11:05 --------------------------------------------------------------------------------------------------
04:11:05 

NAOqui 2.1.4 OS does not stand on startup with latest naoqi_dcm_driver

The latest naoqi_dcm_driver builds with the noaqi_libqi and _libqicore version 2.5 according to the CMake build options.

If we try to run this with our existing Nao robots with NAOqi OS 2.1.4, the robot fails to stand on startup.
On a Nao with version with NAOqi OS 2.1.2 the robot stands as expected.

Should we be using the libqi version 2.5 with the on robot software 2.1.4?
Should we revert back to using the 2.1.4 SDK, or is there a secret 2.5 version for the Nao robot?

Integrate sensor and camera in this driver

Hi,

I tried to implement this driver for a NAO H25 V5. It works when I use the trajectory controller. However, it seems that the sensors (like IMU, FSR) and the camera image are not published from this driver. I am wondering can I get some suggestions on integrating these sensors in this driver.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.