Help with NAO v5 + SDK 2.1 + ROS

879 views
Skip to first unread message

Igor Rodriguez

unread,
Feb 19, 2015, 9:05:41 AM2/19/15
to ros-sig-...@googlegroups.com
Hi everyone, 

I recently purchased a new NAO (v5) and I am trying to get it working with ROS on a real NAO without succeed.  I have downloaded the latests both Python and c++ SDK 2.1 (I don't know what I should use). These are the steps I followed:

1.a- add to .bashrc the PYTHONPATH of python naoqi sdk ->  I can run pyhton programs from python console.
1.b I have installed C++ SDK and I have tested sayhelloword example with succeed.
2. Download and compile all ROS packages from naoqi git -> all done

I tried running it in two different ways with force_python true and false: roslaunch nao_bringup nao_full nao_ip:=my_ip. I got the next error message, and I don't know what I'm doing wrong. Thanks in advance.

core service [/rosout] found
process[diag_agg-1]: started with pid [27496]
process[base_footprint-2]: started with pid [27512]
process[robot_state_publisher-3]: started with pid [27556]
process[naoqi_joint_states-4]: started with pid [27634]
process[naoqi_moveto-5]: started with pid [27665]
ERROR: cannot launch node of type [nao_driver/nao_logger.py]: nao_driver
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/bee/robotak/nao/ros/src
ROS path [2]=/opt/ros/indigo/share
ROS path [3]=/opt/ros/indigo/stacks
process[pose_controller-7]: started with pid [27672]
process[pose_manager-8]: started with pid [27678]
process[nao_robot/camera/top/camera-9]: started with pid [27681]
[ERROR] [WallTime: 1424354472.603185] Could not create Proxy to "ALMotion". 
Exception message:
ALBroker::createBroker
Cannot connect to tcp://127.0.0.1:9559
process[nao_robot/camera/bottom/camera-10]: started with pid [27704]
process[nao_robot/sonar/left/naoqi_sonar-11]: started with pid [27732]
[INFO] [WallTime: 1424354472.769401] Connecting to NaoQi at 192.168.2.9:9559
[I] 27672 qimessaging.session: Session listener created on tcp://0.0.0.0:0
[I] 27672 qimessaging.transportserver: TransportServer will listen on: tcp://127.0.0.1:59263
[I] 27672 qimessaging.transportserver: TransportServer will listen on: tcp://192.168.2.58:59263
process[nao_robot/sonar/right/naoqi_sonar-12]: started with pid [27755]
[ERROR] [WallTime: 1424354472.847034] Could not create Proxy to "ALMotion". 
Exception message:
ALBroker::createBroker
Cannot connect to tcp://127.0.0.1:9559
[ERROR] [WallTime: 1424354472.848808] Could not create Proxy to "ALMemory". 
Exception message:
ALBroker::createBroker
Cannot connect to tcp://127.0.0.1:9559
================================================================================REQUIRED process [naoqi_moveto-5] has died!
process has died [pid 27665, exit code 1, cmd /home/bee/robotak/nao/ros/src/naoqi_bridge/naoqi_driver/nodes/naoqi_moveto.py --pip=127.0.0.1 --pport=9559 __name:=naoqi_moveto __log:=/home/bee/.ros/log/721d1fc6-b832-11e4-946f-5c514f252547/naoqi_moveto-5.log].
log file: /home/bee/.ros/log/721d1fc6-b832-11e4-946f-5c514f252547/naoqi_moveto-5*.log
Initiating shutdown!
================================================================================
cannot add process [nao_robot/microphone/naoqi_microphone-13] after process monitor has been shut down
The traceback for the exception was written to the log file
[nao_robot/sonar/right/naoqi_sonar-12] killing on exit
[nao_robot/sonar/left/naoqi_sonar-11] killing on exit
[nao_robot/camera/bottom/camera-10] killing on exit
Traceback (most recent call last):
  File "/home/bee/robotak/nao/ros/src/naoqi_bridge/naoqi_sensors/nodes/sonar.py", line 19, in <module>
    import rospy
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/__init__.py", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/client.py", line 49, in <module>
    import rosgraph
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/__init__.py", line 36, in <module>
    from . masterapi import Master, MasterFailure, MasterError, MasterException
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/masterapi.py", line 41, in <module>
    from xmlrpc.client import ServerProxy  # Python 3.x
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/xmlrpc.py", line 67, in <module>
    import rosgraph.network
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/network.py", line 66, in <module>
    if platform.system() == 'FreeBSD':
  File "/usr/lib/python2.7/platform.py", line 1333, in system
    return uname()[0]
  File "/usr/lib/python2.7/platform.py", line 1300, in uname
    processor = _syscmd_uname('-p','')
  File "/usr/lib/python2.7/platform.py", line 1034, in _syscmd_uname
[nao_robot/camera/top/camera-9] killing on exit
    output = string.strip(f.read())
KeyboardInterrupt
[pose_manager-8] killing on exit
[pose_controller-7] killing on exit
[naoqi_moveto-5] killing on exit
[naoqi_joint_states-4] killing on exit
[robot_state_publisher-3] killing on exit
[base_footprint-2] killing on exit
[diag_agg-1] killing on exit
[INFO] [WallTime: 1424354473.025095] Stopping pose_controller
[INFO] [WallTime: 1424354473.025470] pose_controller stopped
bee@bee-zenbook:~/robotak/nao/ros$ [FATAL] [WallTime: 1424354473.102283] Could not connect to required "joint_trajectory" action server, is the nao_controller node running?
[INFO] [WallTime: 1424354473.150442] Connecting to NaoQi at 127.0.0.1:9559
[I] 27732 qimessaging.session: Session listener created on tcp://0.0.0.0:0
[W] 27813 qimessaging.transportsocket: connect: Connection refused
[I] 27732 qimessaging.transportserver: TransportServer will listen on: tcp://127.0.0.1:33859
[I] 27732 qimessaging.transportserver: TransportServer will listen on: tcp://192.168.2.58:33859
[ERROR] [WallTime: 1424354473.152915] Could not create Proxy to "ALMemory". 
Exception message:
ALBroker::createBroker
Cannot connect to tcp://127.0.0.1:9559
[I] 27732 qimessaging.session: Session listener created on tcp://0.0.0.0:0
[W] 27813 qimessaging.transportsocket: connect: Connection refused
[I] 27732 qimessaging.transportserver: TransportServer will listen on: tcp://127.0.0.1:52743
[I] 27732 qimessaging.transportserver: TransportServer will listen on: tcp://192.168.2.58:52743
[ERROR] [WallTime: 1424354473.154064] Could not create Proxy to "ALSonar". 
Exception message:
ALBroker::createBroker
Cannot connect to tcp://127.0.0.1:9559
[INFO] [WallTime: 1424354473.154213] sonar or memory proxy is invalid
[INFO] [WallTime: 1424354473.154474] Stopping sonar_publisher
[INFO] [WallTime: 1424354473.154585] sonar_publisher stopped
[I] 27704 qimessaging.session: Session listener created on tcp://0.0.0.0:0
[I] 27704 qimessaging.transportserver: TransportServer will listen on: tcp://127.0.0.1:45873
[I] 27704 qimessaging.transportserver: TransportServer will listen on: tcp://192.168.2.58:45873
[W] 27844 qimessaging.transportsocket: connect: Connection refused
[ERROR] [WallTime: 1424354473.213933] Could not create Proxy to "ALVideoDevice". 
Exception message:
ALBroker::createBroker
Cannot connect to tcp://127.0.0.1:9559
[INFO] [WallTime: 1424354473.232868] nao_controller initialized
[INFO] [WallTime: 1424354473.233134] nao pose_controller running...
[INFO] [WallTime: 1424354473.233323] nao pose_controller stopped.
[INFO] [WallTime: 1424354473.303901] Stopping naoqi_camera
[INFO] [WallTime: 1424354473.304338] naoqi_camera stopped
Traceback (most recent call last):
  File "/home/bee/robotak/nao/ros/src/naoqi_bridge/naoqi_sensors/nodes/camera.py", line 6, in <module>
    naocam = NaoqiCam()
  File "/home/bee/robotak/nao/ros/src/naoqi_bridge/naoqi_sensors/src/naoqi_sensors/naoqi_camera.py", line 63, in __init__
    NaoqiNode.__init__(self, node_name)
  File "/home/bee/robotak/nao/ros/src/naoqi_bridge/naoqi_driver/src/naoqi_driver/naoqi_node.py", line 93, in __init__
    rospy.on_shutdown(self.__on_ros_shutdown)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/client.py", line 116, in on_shutdown
    rospy.core.add_client_shutdown_hook(h)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/core.py", line 352, in add_client_shutdown_hook
    _add_shutdown_hook(h, _client_shutdown_hooks)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/core.py", line 316, in _add_shutdown_hook
    h("already shutdown")
TypeError: __on_ros_shutdown() takes exactly 1 argument (2 given)

Karsten K

unread,
Feb 19, 2015, 9:27:24 AM2/19/15
to ros-sig-...@googlegroups.com


On Thu, Feb 19, 2015 at 3:05 PM, Igor Rodriguez <rodrigu...@gmail.com> wrote:
Hi everyone, 
Hi Igor, 
 
1.a- add to .bashrc the PYTHONPATH of python naoqi sdk ->  I can run pyhton programs from python console.
1.b I have installed C++ SDK and I have tested sayhelloword example with succeed.
2. Download and compile all ROS packages from naoqi git -> all done

So far this look all correct, given that the ROS packages from git mean naoqi_bridge and nao_robot. 

 
I tried running it in two different ways with force_python true and false: roslaunch nao_bringup nao_full nao_ip:=my_ip. I got the next error message, and I don't know what I'm doing wrong. Thanks in advance.
As far as I can tell, this is where it's going wrong. the NAO_IP is not exposed as a rosparam but rather as an shell environment variable. You will see that in the error message since you are trying to connect to an robot ip of 127.0.0.1
So in the same terminal just run
# export NAO_IP=<ip_of_your_robot>

then launch: 
# roslaunch nao_bringup nao_full

and you should be good to go!
Then just open up a RVIZ, load the RVIZ configuration file in nao_bringup/config and you should see the cameras and the sonars etc..

Feel free to give some feedback whether it worked out for you or not.

hth,
Karsten



--
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 post to this group, send email to ros-sig-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ros-sig-aldebaran.
To view this discussion on the web visit https://groups.google.com/d/msgid/ros-sig-aldebaran/6a5f6548-195c-4aea-93d7-9da096047501%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Igor Rodriguez

unread,
Feb 19, 2015, 12:51:16 PM2/19/15
to ros-sig-...@googlegroups.com
Hi Karsten

Thanks for your help! You were right. I thought that "nao_ip" and "force_python" params were necessary, because I came from an older version of nao (v4) working with 1.14 python SDK and those parameters were required to run the nao_bringup correctly.

I have another doubt, if i change the launch file and edit the force_python param to true I'm launching it using python sdk? or Im using C++ sdk? Now if I dont change it (so force_python = false) I got the following error: 
ERROR: cannot launch node of type [naoqi_driver/naoqi_joint_states_cpp]: can't locate node [naoqi_joint_states_cpp] in package [naoqi_driver]   
ERROR: cannot launch node of type [nao_driver/nao_logger.py]: nao_driver
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/bee/robotak/nao/ros/src
ROS path [2]=/opt/ros/indigo/share
ROS path [3]=/opt/ros/indigo/stacks

Besides, if I run it with force_python = true I only get the nao_logger error.

And finally, do you know how can I order the robot to start walking? As I know, when I was using the older version of NAO I only had to publish the desired velocities on /cmd topic. But now I cant find that topic.

Thanks again 

Mikael Arguedas

unread,
Feb 19, 2015, 3:07:10 PM2/19/15
to ros-sig-...@googlegroups.com
Hi,
If you put force_python to true, you use the python nodes. If it's false you will launch the c++ nodes.
The error : "ERROR: cannot launch node of type [naoqi_driver/naoqi_joint_
states_cpp]: can't locate node [naoqi_joint_states_cpp] in package [naoqi_driver]" means that the c++ nodes are not properly built.
When you run catkin_make, if the naoqi C++ sdk is not found you should have the following message :
-- Cannot find NAOqi C++ SDK! Set NAOqi_DIR to the SDK prefix to build the C++ nodes

This means that the C++ sdk wasn't find by CMake. Thus the c++ nodes won't be built.
To use the C++ sdk you need to set an environment variable to give the path of the C++ SDK;
export AL_DIR=PATH_TO_YOUR_NAOQI_C++_SDK

If you put force_python to true you don't need to have compiled nodes (because its Python) so you just need to have naoqi python sdk in your PYTHONPATH.

Regarding the nao_logger.py error, I think the issue is that the launchfile tries to run nao_driver nao_logger.py instead of naoqi_driver naoqi_logger (https://github.com/ros-naoqi/naoqi_bridge/blob/master/naoqi_driver/launch/naoqi_driver.launch#L32).
Karsten can you confirm ?

Hope this helps,

Mikael

--
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 post to this group, send email to ros-sig-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ros-sig-aldebaran.

Vincent Rabaud

unread,
Feb 19, 2015, 4:05:38 PM2/19/15
to ros-sig-...@googlegroups.com
just fixed the nao_logger, thx !

Igor Rodriguez

unread,
Feb 20, 2015, 3:16:26 AM2/20/15
to ros-sig-...@googlegroups.com
Hi Vincent, 

just fixed the nao_logger, thx !
 
I think that it is still an issue, you have changed the name of the package to naoqi_driver in the launch file, but you should change also the name of the node, which is "naoqi_logger.py" 

Thanks Mikael for your help, the naoqi_joint_states_cpp error has been solved before add the AL_DIR.

Anyone knows why the nao_walker node has been dissapeared. How can I command the robot velocities?

Igor

Karsten K

unread,
Feb 20, 2015, 5:21:36 AM2/20/15
to ros-sig-...@googlegroups.com
Anyone knows why the nao_walker node has been dissapeared. How can I command the robot velocities?
For it works when I simply launch 
$ roslaunch nao_apps nao_walker.launch

This opens the cmd_vel subscribers and commands the robot to walk

let me know if it helps.
We could also think about putting the walker directly into the nao_bringup launch file. 

Igor

--
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 post to this group, send email to ros-sig-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ros-sig-aldebaran.

Igor Rodriguez

unread,
Feb 20, 2015, 8:21:55 AM2/20/15
to ros-sig-...@googlegroups.com
Thanks Karsten. I mostly use the walker node, so I added it in my own bringup launcher 

Karsten K

unread,
Feb 20, 2015, 8:35:34 AM2/20/15
to ros-sig-...@googlegroups.com
Don't know the node in detail. Feel free to make a pull request if you see a need for it to get started on startup. Please verify the robot cpu load when doing it though. 

On Fri, Feb 20, 2015 at 2:21 PM, Igor Rodriguez <rodrigu...@gmail.com> wrote:
Thanks Karsten. I mostly use the walker node, so I added it in my own bringup launcher 

--
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 post to this group, send email to ros-sig-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ros-sig-aldebaran.

Karsten Knese

unread,
Mar 2, 2015, 5:37:15 AM3/2/15
to ros-sig-...@googlegroups.com
Hi Igor,

just to re-alive this thread. I just pushed a fix to nao_robot regarding the walker engine. 
the nao_walker will be started by default. Further, I pushed a fix to enable the initialize pose to enable the walker. 


So in order to make the robot walk, simply execute the following lines:

$ roslaunch nao_bringup nao_full.launch
$ rosservice call /body_stiffness/enable "{}"
$ rostopic pub -1 /cmd_vel geometry_msgs/Twist '{linear: {x: 1.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}'

Please let me know if this works for you. (However, you have to checkout directly from github, changes are not in the current release)

On Friday, February 20, 2015 at 2:35:34 PM UTC+1, Karsten Knese wrote:
Don't know the node in detail. Feel free to make a pull request if you see a need for it to get started on startup. Please verify the robot cpu load when doing it though. 
On Fri, Feb 20, 2015 at 2:21 PM, Igor Rodriguez <rodrigu...@gmail.com> wrote:
Thanks Karsten. I mostly use the walker node, so I added it in my own bringup launcher 

--
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-aldebaran+unsubscribe@googlegroups.com.
To post to this group, send email to ros-sig-aldebaran@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages