Closed asiron closed 9 years ago
what commands do you run ? This works here if we just do a:
catkin_make -DNAOqi_DIR=/home/vrabaud/work/naoqi-sdk-2.2.0.55-linux64
I have been following the tutorial to compile on opennao-vm and then copy binaries onto the real robot
NAOqi_DIR=~/my_workspace/external/linux64-atom-pub/libnaoqi-sysroot/ src/catkin/bin/catkin_make_isolated --pkg naoqi_sensors --install -DCMAKE_BUILD_TYPE=Release --force-cmake
This works if I specify --pkg naoqi_driver
instead of naoqi_sensors
@keulYSMB , can you please have a look ? Thx
I think the problem is that naoqi_driver package has cmake/FindNAOqi.cmake
file, whereas naoqi_sensors doesn't have it, and building only naoqi_bridge --pkg naoqi_bridge
doesn't invoke other packages, so find_package(NAOqi ...)
inside CMakeLists.txt for naoqi_sensors, doesn't have NAOqi_FOUND variable set.
yes that's one of the issues, in the previous version this FindNAOqi.cmake file was duplicated in every package using NAOqi C++ APIs.
We decided not to duplicate this file in every package using naoqi functions (to look for NAOqi SDK only once during precompilation process, and not every time a package needs it) . But this assumes that people always compile all the naoqi packages at the same time and don't try to compile only naoqi_sensors for example. So this will work for every catkin_make call but not for a catkin_make --pkg naoqi_sensors.
If this is really an issue we can still get back to the previous architecture, which is not optimised but works even if you build only one package using NAOqi C++ API.
I understand, but I think it would be better to duplicate since for example if one wants to compile single package on opennao-vm and then rsync with the real robot, one has to recompile all packages, which is basically compiling all ros from base (100+ packages), and this takes a lot of time.
well, you cannot compile a package without its dependencies anyway. catkin_make --pkg only recompiles one package but that assumes that you already have the dependencies. Maybe what you need to use is the --only-pkg-with-deps option.
--only-pkg-with-deps compiles ~77 packages so I think it's also out of option for me, I tried that anyway but it also doesn't compile C++ nodes for naoqi_sensors. Let's assume that I compiled my workspace and I don't change dependencies for this package, and if I do I could recompile workspace, but this wouldn't happened too often.
I don't understand your workflow: you need ROS to compile naoqi_sensors.Ok, where do you get it ? DId you install packages from robotpkg on your VM ? (not sure if that is possible), did you compile it in your one workspace that contains ROS and naoqi_sensors ? Or, you have two workspaces: a core one where you compile ROS, that you source and after which you compile your second workspace that only has naoqi_sensors ?
I was following tutorial from ROS wiki: http://wiki.ros.org/nao/Installation/compileFromVirtualNao So I ended up having one workspace with ROS and all other packages (NAO packages), where I compile all with catkin_make_isolated and after copy the entire install_isolated onto the robot.
I forked the repo, added cmake folder and modified CMakeLists.txt to include it. I also had to update install in CMakeLists.txt to install include folder, because C++ nodes didn't want to compile as they couldn't find the naoqi_node.h.
I think these issues appear only when using catkin_make_isolated.
finally had a chance to test that: there was indeed a bug in naoqi_driver at https://github.com/ros-naoqi/naoqi_bridge/. Can you please use master in your workspace and confirm that it works for you ? Thx
I checked and now it works correctly, thanks for fixing the bug :+1:
cool ! closing. Will release asap.
I am compiling packages on opennao-vm, and with rosinstall_generator I can't add metapackage naoqi_bridge, so I added naoqi_sensors, naoqi_driver, naoqi_msgs by hand. The second one compiles well with C++ if NAOqi_DIR is specified correctly, because FindNAOqi.cmake exists for this package.
However this is not the case for naoqi_sensors, is this intended or a mistake ?