osrf / drcsim

Repository for the DRC project.
18 stars 7 forks source link

Re-establish compatibility between simulated and real Atlas #421

Open osrf-migration opened 10 years ago

osrf-migration commented 10 years ago

Original report (archived issue) by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


Starting after the VRC, the Atlas interface provided by BDI for the real robot and the one provided for by OSRF for drcsim started to diverge (with features being added to the former, while development largely stopped for the latter). Our team tried keep both simulation and real robot working via a compatibility layer at first, but with ongoing development by BDI, state transitions, parameters and walking capabilities completely changed/improved beyond what is possible with the simulation plugin, so maintenance of the compatibility layer became impractical. This means that there really is no way anymore to properly test the whole system in simulation without resorting to workarounds like making the robot float instead of walking when one wants to leverage BDI´s behavior library.

Are there any plans to close this gap again? The best solution certainly would be a interface that mimics BDI´s interface on the real robot and that talks to Gazebo behind the scenes. As the real robot BDI interface is not publically available and bound to NDA restrictions, this could only be provided to parties who signed the necessary NDA with BDI, however.

For completeness, these are tickets that are concerned with working around some aspects of the described issue: #345, #385

osrf-migration commented 10 years ago

Original comment by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


osrf-migration commented 10 years ago

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


We are working on getting the updated behavior libraries for simulation from BDI/Google, it's in process... we'll post updates here as soon as they become available.

Once we get something in the pipeline, following issues will be tackled:

Thanks.

osrf-migration commented 10 years ago

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


While we are waiting for an updated libAtlasSimInterface for the new Atlas v3, a question for the teams: Would it be helpful for drcsim to provide a libAtlasRobotInterface.so binary that works with simulated robot in gazebo, and uses headers from AtlasRobotInterface_*.tar.gz (e.g. AtlasInterface.h et. al. shipped with AtlasRobotInterface version 2.12.0)? This way, teams should be able compile their controls software against the BDI headers and link against the simulation binary libAtlasRobotInterface.so to test in simulation. We'll provide instructions for doing so as well.

Thoughts?

Thanks,

osrf-migration commented 10 years ago

Original comment by Dave Kotfis (Bitbucket: dkotfis).


We would not be opposed to this, though our software already abstracts us from the current API differences between hardware and sim. However, it would be nice to only maintain a single interface. We would probably place higher value in getting more accurate meshes, recovering the walking behaviors, and getting Robotiq hand simulation.

osrf-migration commented 10 years ago

Original comment by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


We would also like to switch to a single interface, so the proposal sounds good to us. While this would retain limited capabilities in simulation at first (no walking, no desired pelvis poses etc.), these capabilities could then also be added gradually "under the hood" without teams having to perform changes in their code.

It sounds like "fake" BDI behaviors as described in #385 could also be added relatively easily.

osrf-migration commented 10 years ago

Original comment by GoRobotGo (Bitbucket: GoRobotGo).


John - We have been using the libAtlasRobotInterface.so, but we have changed the library name to differentiate the BDI version from the sim version. This is to prevent any confusion or problems when transitioning between online and offline. The executable that links against libAtlasRobotInterface.so then is built with an online version and an offline version that link against the appropriate library. This again reduces confusion and allows for the offline executable to use appropriate gains, etc.

osrf-migration commented 10 years ago

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


Progress Update: officially got the updated libAtlasSimInterface for Atlas V3 last week. Working on updating drcsim to support it.

osrf-migration commented 10 years ago

Original comment by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


Any news on this one? We´re changing some of our controller infrastructure and it would be of great help if this single interface approach would happen soon.

osrf-migration commented 10 years ago

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


working on this. what's your timeline?

osrf-migration commented 10 years ago

Original comment by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


We want to work on this within the next 4 weeks. We can adjust project schedule a little bit, so if you say you´ll have something in 2 weeks that would be useful. If you think it will take at least a month, we´ll use a unrelated other solution in the meantime.

osrf-migration commented 10 years ago

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


we are testing things right now. So we'll aim for getting a working controller with Atlas v3 and the new BDI controller (libAtlasSimInterface) by Friday 8/15. How does that sound?

With the new process, the drcsim package will be shipped without the libAtlasSimInterface library. The teams will have to get the new libAtlasSimInterface binary from BDI/Google directly, and the robot controller plugin (AtlasPlugin) will try to dynamically load the library from a presumed system install location.

osrf-migration commented 10 years ago

Original comment by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


Sounds good, we´ll plan accordingly :)

osrf-migration commented 10 years ago

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


Status update:

The atlas_shim_interface branch compiles a shim library against headers that are AtlasSimInterface 2.10.2 compatible. The goal is that one can drop in the official BDI supplied libAtlasSimInterface.so over the shim libAtlasSimInterace.so and will be able to control the robot with the new behaviors.

The controller is not behaving correctly right now, we are debugging at this point.

@nkoenig @BillBlank @caguero @j-rivero

osrf-migration commented 10 years ago

Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero).


A new drcsim-prerelease 4.0.0 package has been created for both Precise/Hydro and Trusty/Indigo. It includes the atlas_shim_interface branch. Let me know if you find any problem.

osrf-migration commented 10 years ago

Original comment by Frank Weng (Bitbucket: GreatSuccess).


libAtlasRobotInterface.so provided by BDI has been at version 2.12.0 since February. Any plans to move libAtlasSimInterface.so up from 2.10.2?

osrf-migration commented 10 years ago

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


AtlasRobotInterface and AtlasSimInterference have fundamentally different interfaces by design. We'll need another Shim to go from AtlasRobotInterface to AtlasSimInterface.

osrf-migration commented 10 years ago

Original comment by Frank Weng (Bitbucket: GreatSuccess).


My apologies. I was under the impression that the update was to also include the update described in third comment of this issue. Any timeline as to when that'll happen?

osrf-migration commented 10 years ago

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


@GreatSuccess No problem! Can you provide an example code that compiles against / uses AtlasRobotInterface? I've started adding yet another shim at 59afd521cf042f0701b3a4460379955f426e8495.

osrf-migration commented 10 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


osrf-migration commented 10 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


There is code in the drcsim package that maps libAtlasRobotInterface.so to simulation. See this.

@GreatSuccess, does that work for you?

osrf-migration commented 10 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


Has any of the teams tried this solution? And if so, have you experienced any issues?

osrf-migration commented 10 years ago

Original comment by Frank Weng (Bitbucket: GreatSuccess).


Sorry for the slow response.

Yes, I've tried it. It's written to link to some other version of AtlasRobotInterface. The version I have (which I believe is the current version) is 2.12.0. There's been API changes since then.

osrf-migration commented 9 years ago

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


created issue to migrate the tutorial to new tutorial site.

tutorial for testing

corresponding pull request