cyberbotics / naoqisim

NAOqi enabled controller for simulated NAO robots in Webots
Other
23 stars 11 forks source link

Cartesian motion infeasible when trying to make NAO move. #7

Closed AayuStark007 closed 5 years ago

AayuStark007 commented 5 years ago

Using: Webots R2019a Revision 1 Ubuntu 18.04 Python 2.7.15 :: Anaconda, Inc.

I ran the nao walk examples from aldebaran docs. When I run the script, the robot seems to get in a ready state but it does not move. I am getting a lot of error messages in the console regarding infeasible cartesian motion. I am providing all the webots console logs below.

naoqisim init on running script

Also the script that I'm trying to run: nao_walk.py

omichel commented 5 years ago

It seems to be a problem on the simulator-sdk side (which includes the naoqi emulation). Unfortunately, we cannot help on this as this is proprietary binary code belonging to SoftBank Robotics. You should probably report the problem to SoftBank Robotics.

fernandozuher commented 4 years ago

Hello, @AayuStark007 and @omichel.

@costashatz in: https://github.com/costashatz/nao_gazebo

...simulates NAO in Gazebo through NAOqi Simulator SDK. He also had the same problem about walking: https://github.com/costashatz/nao_gazebo/pull/1

...which seems to be fixed in this commit: https://github.com/costashatz/nao_gazebo/commit/fc6488ac7ffab0911cb436b39394e392302abb78 and video: https://www.youtube.com/watch?v=xPg7caI26Z4

I tried all sort of programming/computer witchcraft to fix that walking problem in Webots: googling the errors, adapting the commit from @costashatz to this repository, updating the naoqi-sdk version used in this repository (2.1.4.1) to newer versions, using different versions of Webots (from R2018a) and Choregraphe... Unfortunately with no success. =/

Since SoftBank Robotics and Webots don't support NAOqi in Webots anymore: https://cyberbotics.com/doc/guide/nao#naoqi-and-choregraphe

...I was thinking that problem may be fixed through adapting this current repository to use the last naoqi-sdk, which could be the python-sdk 2.8.6.23 or cplusplus-sdk (2.8.5); as of this writing. I can do that, but I would need help to understand the structure written in the controller files located in naoqisim controller: naoqisim.cpp, Nao.cpp, ...

If I can help, let me know.

omichel commented 4 years ago

@fernandozuher: you are very welcome to help. We will be happy to answer your questions if you need help to understand the naoqisim controller source code.

fernandozuher commented 4 years ago

Thanks for your quick reply and kindness, @omichel. I will look better the files structure/code and try to understand how it is done. Then I come back here with a proper amount of questions. Thanks again.

wbadry commented 4 years ago

I will try to set an example showing how to do so.

williamnavaraj commented 4 years ago

Not just motion. Any action with respect to FRAME_ROBOT or FRAME_WORLD is not working and returns NaN. getRobotPosition(), getTransform("Torso",1,True) and getTransform("Torso",2,True) does not work.

alvimpaulo commented 4 years ago

I have yet to figure out why, but is seems that running a specific choregraph behavior made the robot able to walk through naoqi at least once. However, I have tried the same procedure other times and it doesn't seem to work anymore. Does something change when you upload a behavior to the robot for the first time?

alvimpaulo commented 4 years ago

After some tests, I can make the robot move once each computer restart. The first time it launches the simulator, it works as expected. However if I restart the simulation for any reason, it seems to try to restart the HAL and gives an error of already having a existing HAL running. Whenever I get this error, I can not make the robot move. Is there some code that is run when the HAL is stated the first time but not when it is restarting? @omichel

omichel commented 4 years ago

As far as I remember we had to manually kill any HAL process in order to be able to restart a simulation. For some reason the HAL process doesn't always quit properly. This software is unfortunately no under our control and is not open source. It comes from the SDK provided by softbank robotics.

alvimpaulo commented 4 years ago

I imagined so. Even after searching and killing all processes related with naoqi, hal and dcm, the robot can only move once per restart. Even deleting the shared memory files did not solve it. Anyway, more searching to do. Thanks for the response.

fernandozuher commented 4 years ago

Thanks for your quick reply and kindness, @omichel. I will look better the files structure/code and try to understand how it is done. Then I come back here with a proper amount of questions. Thanks again.

@omichel and @wbadry, I refactored the naoqisim controller in order to understand and update it to the last naoqi-sdk version. The full message can be found in the issue #10.