ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

C++ SDK problem with NAO

asked 2015-05-04 13:18:32 -0500

bl0ggy gravatar image

updated 2015-05-05 02:06:12 -0500

Hi !

I'm working on the NAO robot, NAOqi verion 2.1. As said in the tutorial, I've added my python SDK to the PYTHONPATH, that's ok. But when I catkin_make the naoqi_bridge-master, I have the following error for the C++ SDK (2.1.2.17 linux32) :

-- +++ processing catkin package: 'naoqi_driver'
-- ==> add_subdirectory(naoqi_bridge-master/naoqi_driver)
-- Using these message generators: gencpp;genlisp;genpy
-- Could not find NAOqi's alcommon
-- Could not find NAOqi's alvision
-- Could not find NAOqi's alproxies
-- Could not find NAOqi's alerror
-- Could not find NAOqi's alvalue
-- Cannot find NAOqi C++ sdk; C++ nodes will NOT be built
-- +++ processing catkin package: 'naoqi_sensors'
-- ==> add_subdirectory(naoqi_bridge-master/naoqi_sensors)
-- Using these message generators: gencpp;genlisp;genpy
-- Could not find NAOqi's alcommon
-- Could not find NAOqi's alvision
-- Could not find NAOqi's alproxies
-- Could not find NAOqi's alerror
-- Could not find NAOqi's alvalue
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   thread
--   program_options
-- -- Cannot find NAOqi C++ SDK! Set NAOqi_DIR to the SDK prefix to build the C++ nodes.

I've tried to add the SDK directry to AL_DIR, LD_LIBRARY_PATH, PYTHONPATH, and NAOqi_DIR (as said in the last line). But none of them work. I've also read here http://answers.ros.org/question/13513... that this guy (Dante) choose the "lib" directory, so I tried that too, but still nothing... But, ahendrix said that we can put it in CMAKE_PREFIX_PATH, and... now I have a "real" error :

-- +++ processing catkin package: 'naoqi_driver'
-- ==> add_subdirectory(naoqi_bridge-master/naoqi_driver)
-- Using these message generators: gencpp;genlisp;genpy
CMake Error at /home/jessy/naoqi/naoqi/share/cmake/boost/boost-config.cmake:10 (export_header):
  Unknown CMake command "export_header".
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindBoost.cmake:177 (find_package)
  naoqi_bridge-master/naoqi_driver/CMakeLists.txt:26 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jessy/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/jessy/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

I really don't know how to fix that, I can't even find the "export_header" on google, I've tried to change it by "generate_export_header" ( http://www.cmake.org/cmake/help/v3.0/... ) but CMake doesn't know it..

Do I have to use the linux64 version ? I've already tried ROS on a linux64, but I had problems.

Thank you for your help.

EDIT :

I've also got an error with the libcurl.so.4 from NAOqi's lib, but I ddn't know how to get it again before I look my cmake version :

$ cmake --version
cmake: /home/jessy/naoqi/naoqi/lib/libcurl.so.4: no version information available (required by cmake)
cmake version 2.8.12.2

Why is there no version information ?

The naoqi_driver's CMakeLists.txt need the version 2.8.3, so my version is good.

edit retag flag offensive close merge delete

Comments

Which tutorial are you mentioning ? Why do you compile in 32 ? Are you in a VM or are you cross-compiling ? Do you need the C++ bridge ? It provides the same functionality as the Python one. The right method is to set NAOqi_DIR as mentioned in the Cmake comment, how do you set it ?

Vincent Rabaud gravatar image Vincent Rabaud  ( 2015-05-05 03:56:29 -0500 )edit

I mean that tutorial Because I had problem with 64 bits version, I don't remember what, it was a few months ago, when I started learning ROS. I'm not on a VM. Yes, I want to program with C++. I put it in .bashrc like the PYTHONPATH.

bl0ggy gravatar image bl0ggy  ( 2015-05-05 04:24:40 -0500 )edit

As you see, the SDK in found, it's trying to make /home/jessy/naoqi/naoqi/share/cmake/boost/boost-config.cmake, I just don't know why CMake doesn't know "export_header" at the end of this file.

bl0ggy gravatar image bl0ggy  ( 2015-05-05 04:37:32 -0500 )edit

export_header is unfortunately a qibuild only macro. Are you on a 64 bit machine ? Which part of the tutorial exactly ? Do you want to do C++ on your machine or on the robot ? Also, we just announced an official C++ bridge: https://groups.google.com/forum/#!top...

Vincent Rabaud gravatar image Vincent Rabaud  ( 2015-05-05 04:54:04 -0500 )edit

So.. How can I make it work ? I'm on a 32 bit machine, for now I only want to run it on my machine, connected to the NAO. Run on the NAO looks a little difficult for me, and I just want to experiment.

bl0ggy gravatar image bl0ggy  ( 2015-05-05 05:03:32 -0500 )edit

The tutorial give the command "echo 'export PYTHONPATH=~/naoqi/pynaoqi-python2.7-2.1.2.17-linux64:$PYTHONPATH' >> ~/.bashrc", but I open it myself with gedit, and put the right folder.

bl0ggy gravatar image bl0ggy  ( 2015-05-05 05:04:56 -0500 )edit

Did you follow those instructions ? http://wiki.ros.org/nao/Tutorials/Ins...

Vincent Rabaud gravatar image Vincent Rabaud  ( 2015-05-05 07:23:46 -0500 )edit

Yes, I just redid them, but it's still the same.

bl0ggy gravatar image bl0ggy  ( 2015-05-05 07:49:54 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2015-05-08 02:05:50 -0500

bl0ggy gravatar image

Ok... Now it's working, I don't know exactly why.

I had to use a kinect to get a skeleton, so I've installed the necessary, but I had a problem too, which I solved by installing openjdk-7-jdk (explained here), so I guess that solved the problem with the SDK.

But now when I launch nao_full.launch (C++) I get this message more than once per second:

[ERROR] [1431067243.763097195]: memData length 2 does not match expected length 10

Does anyone know why ?

Besides, Is it normal that, even in C++, python node are running ?

NODES
    /
        base_footprint (nao_description/base_footprint)
        diag_agg (diagnostic_aggregator/aggregator_node)
        nao_logger (naoqi_driver/naoqi_logger.py)
        nao_walker (nao_apps/nao_walker.py)
        naoqi_joint_states (naoqi_driver/naoqi_joint_states_cpp)
        naoqi_moveto (naoqi_driver/naoqi_moveto.py)
        pose_controller (nao_pose/pose_controller.py)
        pose_manager (nao_pose/pose_manager.py)
        robot_state_publisher (robot_state_publisher/state_publisher)
    /nao_robot/sonar/right/
        naoqi_sonar (naoqi_sensors/sonar.py)
    /nao_robot/camera/top/
        camera (naoqi_sensors/camera.py)
    /nao_robot/camera/bottom/
        camera (naoqi_sensors/camera.py)
    /nao_robot/microphone/
        naoqi_microphone (naoqi_sensors/microphone.py)
    /nao_robot/sonar/left/
        naoqi_sonar (naoqi_sensors/sonar.py)

Thank you.

edit flag offensive delete link more

Comments

only the joint states is in C++ for now

Vincent Rabaud gravatar image Vincent Rabaud  ( 2015-05-09 07:32:34 -0500 )edit

Oh ok, thank you.

bl0ggy gravatar image bl0ggy  ( 2015-05-09 11:03:24 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-05-04 13:18:32 -0500

Seen: 1,072 times

Last updated: May 08 '15