costashatz / nao_gazebo

ROS Packages to simulate Aldebaran's NAO Humanoid in Gazebo through NAOqi Simulator SDK
BSD 3-Clause "New" or "Revised" License
34 stars 19 forks source link

Failed to load plugin libgazebo_naoqi_control.so #10

Open andres5450 opened 5 years ago

andres5450 commented 5 years ago

Hi!

I've followed every step in the readme file, but when i execute roslaunch gazebo_naoqi_control nao_gazebo.launch i get the following error:

**Error [Plugin.hh:149]** Failed to load plugin libgazebo_naoqi_control.so: libgazebo_naoqi_control.so: cannot open shared object file: No such file or directory i'm using ros indigo

Greetings!

costashatz commented 5 years ago

Hey!

Did you catkin_make successfully? Because if the build of the package failed, there will be no libgazebo_naoqi_control.so and thus will not work.

andres5450 commented 5 years ago

/ home / user / catkin_ws / src / I have -gazebo_naoqi_control -nao_gazebo -nao_meshes_master

catkin_make in the folder catkin_ws, the following error: captura de pantalla de 2018-12-17 17 25 00 it's okay? Or the folders go in another direction?

costashatz commented 5 years ago

it's okay? Or the folders go in another direction?

The packages are in the right place, but you need the NAOqi simulator SDK; it requires that you have bought a NAO (and have access to Aldebaran's software). It seems that you do not have it. If you do have it, then you need to set your environmental (or CMAKE) variables correctly: see here.

andres5450 commented 5 years ago

hi! / home / user / naosoftware / I have -naoqi-sdk-2.1.4.13-linux32 -simulator-sdk-1.12.0.59-linux32 -pynaoqi-python2.7-2.1.4.13-linux32

catkin_make in the folder catkin_ws: captura de pantalla de 2018-12-17 20 13 35 cmakelist.txt # Tell Program where to find NAOqi/NAOqiSIM bin add_definitions(-DNAOQI_SDK="/home/diego/naosoftware/pynaoqi-python2.7-2.1.4.13-linux32") add_definitions(-DNAOQI_SIM_SDK="/home/diego/naosoftware/simulator-sdk-1.12.0.59-linux32")

.bashrc source /opt/ros/indigo/setup.bash export PYTHONPATH=${PYTHONPATH}:/home/diego/naosoftware/pynaoqi-python2.7-2.1.4.13-linux32 export LD_LIBRARY_PATH="/home/diego/naosoftware/naoqi-sdk-2.1.4.13-linux32:$LD_LIBRARY_PATH" export PYTHONPATH=${PYTHONPATH}:/home/diego/naosoftware/pynaoqi-python2.7-2.1.4.13-linux32 export LD_LIBRARY_PATH="/home/diego/naosoftware/naoqi-sdk-2.1.4.13-linux32:$LD_LIBRARY_PATH" export AL_SIM_DIR=/home/diego/naosoftware/simulator-sdk-1.12.0.59-linux32 export AL_DIR=/home/diego/naosoftware/naoqi-sdk-2.1.4.13-linux32

I have no idea :/

Greetings!

costashatz commented 5 years ago

Can you give the output of ls /home/diego/naosoftware/simulator-sdk-1.12.0.59-linux32?

andres5450 commented 5 years ago

Can you give the output of ls /home/diego/naosoftware/simulator-sdk-1.12.0.59-linux32?

captura de pantalla de 2018-12-17 22 12 14 I can not find another sdk simulator :/

costashatz commented 5 years ago

Can you give me the output of ls /home/diego/naosoftware/simulator-sdk-1.12.0.59-linux32/include?

andres5450 commented 5 years ago

Can you give me the output of ls /home/diego/naosoftware/simulator-sdk-1.12.0.59-linux32/include?

captura de pantalla de 2018-12-17 22 22 44

costashatz commented 5 years ago

I think you either have an older (or newer) version of NAOqi simulator SDK (or partially installed one?). I will try to check tomorrow what version I was using and come back to you. In the mean time, can you try replacing this line by:

find_path(NAOqiSIM_INCLUDE_DIR alnaosim/alnaosim.h HINTS ${NAOqi_INCLUDE_HINTS} )

And see what happens...

andres5450 commented 5 years ago

I think you either have an older (or newer) version of NAOqi simulator SDK (or partially installed one?). I will try to check tomorrow what version I was using and come back to you. In the mean time, can you try replacing this line by:

find_path(NAOqiSIM_INCLUDE_DIR alnaosim/alnaosim.h HINTS ${NAOqi_INCLUDE_HINTS} )

And see what happens...

download the NAOqi simulator SDK http://cui.unige.ch/~agulleir/tools/NAO/Version%201.14.5/

replacing the line in FindNAOqiSIM.cmake: captura de pantalla de 2018-12-17 22 33 43 I think the error is due to the origin of that SDK simulator, I did not find another ;/

costashatz commented 5 years ago

I think you just need to download the 64bit version.

andres5450 commented 5 years ago

I think you just need to download the 64bit version.

repeat the error ... remote connection?, maybe I'm doing something wrong

costashatz commented 5 years ago

repeat the error ... remote connection?, maybe I'm doing something wrong

I downloaded the file I linked and it has many more files in the include directory. So you are doing something wrong when downloading or extracting the file. These files should be enough for this library to work..

andres5450 commented 5 years ago

i think the problem is with NAOqiSIM_FOUND_COMPONENTS, it says that couldn't found NAOqiSIM becaouse of that. How can i hard code that path? And what is that trying to find? 'cause i have every folder that you mention in the past comments so, i've just hardcoded my naosim path and it keeps throwing me that error.

PS: i have every .h file in order to the paths

costashatz commented 5 years ago

i think the problem is with NAOqiSIM_FOUND_COMPONENTS

I do not think so.

PS: i have every .h file in order to the paths

Do an ls to the folder of include in the simulator SDK to see what the files/folders are..

andres5450 commented 5 years ago

captura de pantalla de 2018-12-18 19 46 21

there is the screenshot of the 64bit version, there are many more files than in the 32 bits version. What can it be?

If you have time can i meet you on discord or something?

Thanks a lot for your help!

costashatz commented 5 years ago

Can you send me the error message?

andres5450 commented 5 years ago

captura de pantalla de 2018-12-19 11 09 53

CMakeLists.txt # Tell Program where to find NAOqi/NAOqiSIM bin add_definitions(-DNAOQI_SDK="/home/diego/naosoftware/pynaoqi-python2.7-2.1.4.13-linux32") add_definitions(-DNAOQI_SIM_SDK="/home/diego/naosoftware/simulator-sdk-1.14.5-linux64/include")

FindNAOqiSIM.cmake find_path(NAOqiSIM_INCLUDE_DIR alcommon/alproxy.h HINTS ${NAOqi_INCLUDE_HINTS} )

i don't have any idea of what else i can do, i did all the possible changes i could do, that the proyects allow me but nothing works.

costashatz commented 5 years ago

Tell Program where to find NAOqi/NAOqiSIM bin add_definitions(-DNAOQI_SDK="/home/diego/naosoftware/pynaoqi-python2.7-2.1.4.13-linux32") add_definitions(-DNAOQI_SIM_SDK="/home/diego/naosoftware/simulator-sdk-1.14.5-linux64/include")

Restore these to the originals (in the CMake file).

Open a terminal and do the following:

cd ~/catkin_ws
export AL_SIM_DIR=/home/diego/naosoftware/simulator-sdk-1.14.5-linux64/
export AL_DIR=/home/diego/naosoftware/pynaoqi-python2.7-2.1.4.13-linux32/
rm -rf build
rm -rf devel
catkin_make

It could be convenient to add these lines at the end of your ~/.bashrc file (so that you don't have to re-type them everytime):

export AL_SIM_DIR=/home/diego/naosoftware/simulator-sdk-1.14.5-linux64/
export AL_DIR=/home/diego/naosoftware/pynaoqi-python2.7-2.1.4.13-linux32/
andres5450 commented 5 years ago

i did what you told me, and it didn't work, but now show a different error.

restore the original(CMakeLists.txt) # Tell Program where to find NAOqi/NAOqiSIM bin add_definitions(-DNAOQI_SDK="$ENV{AL_DIR}") add_definitions(-DNAOQI_SIM_SDK="$ENV{AL_SIM_DIR}")

at the end of the file .bashrc this is what appears

source /opt/ros/indigo/setup.bash export PYTHONPATH=${PYTHONPATH}:/home/diego/naosoftware/pynaoqi-python2.7-2.1.4.13-linux32 export LD_LIBRARY_PATH="/home/diego/naosoftware/naoqi-sdk-2.1.4.13-linux32:$LD_LIBRARY_PATH" export AL_SIM_DIR=/home/diego/naosoftware/simulator-sdk-1.14.5-linux64/ export AL_DIR=/home/diego/naosoftware/pynaoqi-python2.7-2.1.4.13-linux32/

i open the terminal and enter the commands:

captura de pantalla de 2018-12-19 12 45 25 captura de pantalla de 2018-12-19 12 46 03 captura de pantalla de 2018-12-19 12 46 45

thanks for all help, i really appreciate it!

costashatz commented 5 years ago

You need boost installed: sudo apt-get install libboost-dev-all.

andres5450 commented 5 years ago

i already have installed:

captura de pantalla de 2018-12-19 13 07 01

costashatz commented 5 years ago

Can you do ls in the alnaosim folder?

Also what is your cpu, os etc?

andres5450 commented 5 years ago

ls in the alnaosim folder: captura de pantalla de 2018-12-19 15 28 29

captura de pantalla de 2018-12-19 15 30 21 captura de pantalla de 2018-12-19 15 30 50

andres5450 commented 5 years ago

i follow this tutorial https://stackoverflow.com/questions/5389853/doesnt-compile-if-included-boost-thread-in-linux-ubuntu10-10

now this is the new error message:

captura de pantalla de 2018-12-19 19 42 39

effective this file alnaosim_camera_definitions.h is not found in alnaosim:

captura de pantalla de 2018-12-19 20 47 26

costashatz commented 5 years ago

I have a feeling that this nao sdk is either incomplete or corrupt (i.e., files missing etc.). A few months ago I tried the code with the official sdk and there was no issue.

andres5450 commented 5 years ago

where i found the official sdk?, i donwloaded choregraphe and c++ naoqi sdk this official page https://community.ald.softbankrobotics.com/en/resources/software/language/en-gb/robot/nao-2?sort_by=weight&sort_order=ASC, but i didn't found sdk simulator :c

andres5450 commented 5 years ago

i downloaded simulator-sdk-2.1.2.17-linux32 this official page https://community.ald.softbankrobotics.com/en/resources/software/former-nao-versions-simulators

captura de pantalla de 2018-12-20 12 38 57

captura de pantalla de 2018-12-20 12 39 32

costashatz commented 5 years ago

Great news! Please refer to the ROS documentation for these issues: http://wiki.ros.org/roslaunch

Most probably you haven't sourced the correct bashrc file or something..

andres5450 commented 5 years ago

i've executed the source /devel/setup.bash command show up to command at tabular roslaunch gazebo_naoqi_control nao_gazebo.launch.

captura de pantalla de 2018-12-20 15 59 37

captura de pantalla de 2018-12-20 16 00 09

costashatz commented 5 years ago

You need the official NAO meshes (not just the package). Have a look here..

andres5450 commented 5 years ago

Hello!!!

i can get the Nao model in gazebo, but nao does not move :c captura de pantalla de 2018-12-22 16 25 29 captura de pantalla de 2018-12-22 16 25 03

I followed the instructions of the video. I think maybe I get the wrong port, but still do not know how to change it.

andres5450 commented 5 years ago

I have the same problem, try to change the port in the files model.xacro and nao.xacro, but I have the same error. Any solution please :c

Greetings!

ghost commented 5 years ago

Hello!!!

i can get the Nao model in gazebo, but nao does not move :c captura de pantalla de 2018-12-22 16 25 29 captura de pantalla de 2018-12-22 16 25 03

I followed the instructions of the video. I think maybe I get the wrong port, but still do not know how to change it.

Hi! when I run Choregraphe to simulate Nao walk, the model does not move. Any solution?

costashatz commented 5 years ago

Are you sure that you have the right ports? Also, did you follow all the instructions in the video?

When you say it does not move, what do you mean? Does it fall? Or it just stays there? Can you show us a video of the behavior?

andres5450 commented 5 years ago

Hi! Make the connection, but NAO does not walk.

costashatz commented 5 years ago

Hi! Make the connection, but NAO does not walk.

https://drive.google.com/open?id=13JIsxjZour6FWln9lHYEyhTRjjoKLHTe

This is working as expected. Everything is correctly done!

The reason NAO is falling is because the PID values are not properly tuned: see #3 ... You can play with the values in this file: https://github.com/costashatz/nao_gazebo/blob/master/gazebo_naoqi_control/config/gazebo_ros_control_params.yaml

Here's a link on how to tune PID values: https://robotics.stackexchange.com/questions/167/what-are-good-strategies-for-tuning-pid-loops

If you find good ones, please do not hesitate to share them..

andres5450 commented 5 years ago

Hi! Make the connection, but NAO does not walk. https://drive.google.com/open?id=13JIsxjZour6FWln9lHYEyhTRjjoKLHTe

This is working as expected. Everything is correctly done!

The reason NAO is falling is because the PID values are not properly tuned: see #3 ... You can play with the values in this file: https://github.com/costashatz/nao_gazebo/blob/master/gazebo_naoqi_control/config/gazebo_ros_control_params.yaml

Here's a link on how to tune PID values: https://robotics.stackexchange.com/questions/167/what-are-good-strategies-for-tuning-pid-loops

If you find good ones, please do not hesitate to share them..

I will play with the PID values, and if I find an improvement I will not hesitate to upload it, thanks for everything and very good work!