cyberbotics / naoqisim

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

[request] update to NAO v6 naoqi #10

Closed wbadry closed 4 years ago

wbadry commented 4 years ago

Hello, Softbank robotics released a new C++ SDK for NAO. I believe they hold the same API in addition to new one. Is it possible to replace the older one for naoqisim with this one? It may solve several issues. Or it would be great to know what to do to get simlator-sdk based on the new one. Thanks a lot.

omichel commented 4 years ago

We have no plan to work on this, but feel free to do it if you want. You should ask to Softbank if they can provide the simulator-sdk package corresponding to their new C++ SDK for NAO.

wbadry commented 4 years ago

bitmoji

fernandozuher commented 4 years ago

@omichel and @wbadry, I refactored the naoqisim controller in order to understand and update it to the last naoqi-sdk version. This first refactored version can be found here: https://github.com/fernandozuher/naoqi_webots It is not updated with the last naoqi-sdk yet, but it is the beginning. It's a pity that there isn't still a stable communication between "naoqi-sdk" and Webots. Let's work on it. :-) Soon I return with some questions about it.

omichel commented 4 years ago

Very good! I am looking forward to it.

fernandozuher commented 4 years ago

I would like to ask for help in order to understand what is necessary to connect properly "Webots with naoqi". In addition to this message, I updated the README.md in: https://github.com/fernandozuher/naoqi_webots There are some important updates to be read along with this message.

You may write me based on my reflections about what I got from your naoqisim controller:


1 - The controller creates an abstract (I don't mean Abstract class) NAO robot with sensors and actuators based on classes from naoqi-sdk inside namespace Sim. There are other classes as well...


2 - There are particular codes that I am not sure about their utility, but it seems to be related to the communication between Webots and naoqi:

// Initialize qi::os, naoqi C++ sdk
qi::Application(argc, argv);

Singletons::initialize(robot_model, naoqi_port, nullptr);

m_launcher->launch(m_model, naoqi_port, sdk_prefix);

Are they related to that?


3 - I was reading the last qi framework and naoqi-sdk C++ documentations:

... in order to understand how I could solve such connection. However, I didn't find any good introduction about what "qi framework" is for. Also I read that LoLa replaced DCM: http://doc.aldebaran.com/2-8/naoqi/lola/lola.html

Before LoLA (before 2.8) LoLA replaces the DCM, which was running in the naoqi-service process. LoLA and other low level control modules were split from naoqi process to improve safety.

Likewise I saw useful stuff to be read, but inside "deprecated documentation":

Previous SDK C++ and naoqi are not useful. I see it is necessary to update ourselves about the last versions of them.


4 - I don't know whether issues located in:

...could be useful to what we want to do.


I have some questions about the controller code:

? Were they deprecated?

Thanks for your time in advance, @omichel!

omichel commented 4 years ago
  1. Correct.
  2. Yes, the Singleton class is mainly used to communicate between Webots and NAOqi.
  3. You are probably correct. I don't know anything about LoLa or new versions of NAOqi.
  4. I don't know either...

The dumpModel() method can be removed from the Singleton.hpp file as it seems it is not used.

robot->getModel() is the C++ equivalent of the C wb_robot_get_model(), see https://cyberbotics.com/doc/reference/robot?tab-language=c++#wb_robot_get_model

I don't know if the "Sim" classes are deprecated and why they are not hyperlinked in the Aldebaran documentation.

I am sorry I am of little help, but I think most of these questions should be answered by SoftBank robotics support team as they mainly concern the NAOqi SDK.

fernandozuher commented 3 years ago

Hello, @omichel and @wbadry.

I am passing here just to update you about my work on refactoring naoqisim.

I did contact SoftBank Robotics support, RobotLab and with a particular person in the SoftBank team as well. None of them could help me out. =/

I received from the SoftBank Robotics team: Unfortunately it has been determined that our robot is no longer compatible with Webots at this point and we have no further instructions that can assist as any possible work around. We apologize for any inconvenience caused.

I can't go on in such a context. If you, from the Webots side, would like to try to do that... I think we could set a task force. Anyway, I am here in any case.

Best regards.

omichel commented 3 years ago

I am not sure how we can help you. It seems the simulator SDK aimed at interfacing NAOqi with a robot simulator, release a long time ago by Aldebaran robotics, is not supported any more by SoftBank robotics. So what could we do to help you?

fernandozuher commented 3 years ago

If the last SDK does not support such a bridge between NAOqi and Webots anymore, I understand it isn't feasible to go on with that matter. If you, Webots, for any reason would like to go on with that matter (now or after some time), I let my availability here to help with it.

omichel commented 3 years ago

Thank you @fernandozuher. However, if SoftBank doesn't restore the simulator SDK, we won't be able to do anything.

wbadry commented 3 years ago

I believe NAO is dead for Webots. A gazebo might be an alternative if this is a must to be used. The problem with Webots and V-rep after a long time of trials is that both are lacking stepping synchronization resulting in the falling of the robot between commands or inaccurate navigation as feedback is not considered.

The inverse kinematics is still vague to be applied directly to get rid of the SDK for good as Softbank didn't release it and none would tell exactly how to apply it.

omichel commented 3 years ago

@wbadry: I am not sure to understand what you mean with "lacking stepping synchronization". Webots simulations can be synchronous (if you set the synchronization flag of all the Robot node to TRUE). In that case, the robot should not fall randomly and the simulation will be fully reproducible.

wbadry commented 3 years ago

The problem is the implementation of Naoqisim controller as it is not based on synchronization which is not Webots issue. If synchronization is applied, that would be the best of all.

I really tried it for long enough to realize it would never create a real world NAO simulation with configurable steps like in the sdk without the lagging and falling I experienced for long time.

It is not the issue of Webots but really surprising that the synchronization with the sdk hasn't been solved even in early days when NAO was sold with webots license.

omichel commented 3 years ago

Yes, we tried hard to get Aldebaran robotics support virtual time in their simulation SDK, so that we could have synchronized the controller with it. However, this didn't happen and we were stuck about it. I believe the problem is not the simulator, but the naoqi SDK which is not designed to support virtual time, and hence reproducible results.