Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: Steps to support latest CoppeliaSim version #356

Open
wpumacay opened this issue Sep 14, 2023 · 16 comments
Open

[Question]: Steps to support latest CoppeliaSim version #356

wpumacay opened this issue Sep 14, 2023 · 16 comments

Comments

@wpumacay
Copy link
Contributor

Hi there, thanks for the great library 😃 . I was wondering what would be the steps required for adding support for the latest version of CoppeliaSim for PyRep. There's better URDF support and some other improvements that might be great to have when using PyRep.

I took a look at how CFFI is used to expose bindings for the C API, and I'd be great if you could clarify or provide some extra information:

  • Is the sim.h file (used for the CFFI build step) generated from the simLib.h file in the CoppeliaSim folder?. I noticed these are in one-to-one correspondance, the difference just being on how they define the API. If that's the case, could I just generate (maybe manually) a similar sim.h file from the latest simLib.h (from CoppeliaSim v4.5.1), and update the cffi build script accordingly?
  • Are there any other steps that I should take into account for generating bindings for the latest version of CoppeliaSim?

Maybe I could give it a try if the steps are not quite difficult.

@basab-gupta
Copy link

basab-gupta commented Sep 15, 2023

I would be happy to help with this issue @stepjam and @wpumacay as well! The latest version of Coppeliasim has a better remote API i.e. the ZeroMQ and also supports Mujoco which would be great to incorporate into PyRep.

@Coppelia
Copy link
Collaborator

Coppelia commented Sep 15, 2023

Just for info, next CoppeliaSim release will have much better support for Python. Via ZMQ remote API, but also embedded Python scripts, and a possibility to run CoppeliaSim with Python handling the main thread (basically what PyRep does now from what I understand). Should be out within 4-6 weeks

@stepjam
Copy link
Owner

stepjam commented Sep 15, 2023

Happy to support transferring PyRep over to use ZMQ as the backend once the new CoppleiaSim version comes out. I don't have much time these days to write, but I can certainly advise and point people in the right direction :)

@stepjam
Copy link
Owner

stepjam commented Sep 15, 2023

Just a note that the biggest hurdle last time I looked at upgrading pyrep ~2 years ago, was the new IK system within CoppeliaSim, which required non-trivial changes to make PyRep compatible.

@Coppelia
Copy link
Collaborator

@stepjam, I'd be happy to assist where I can

@lgzid
Copy link

lgzid commented Oct 9, 2023

I've recently been using reinforcement learning to train a mobile robotic arm, and PyRep has been a great help to me. I'm looking forward to the new version of PyRep. Thank you for your contributions.

@lgzid
Copy link

lgzid commented Oct 19, 2023

@Coppelia Hello!
Do you have any relevant examples to learn ZQM combined with Python API simulation

@Coppelia
Copy link
Collaborator

@lgzid hi, not sure what you are referring to with your question.. ;) Please wait 1-3 days, and we will have CoppeliaSim V4.6 released. It has a much better Python support/connectivity/reactivity with:

  • main client application
  • embedded scripts
  • ZeroMQ remote API clients

@lgzid
Copy link

lgzid commented Oct 19, 2023

@Coppelia Thank you for your reply!
Looking forward to the new version very much

@stepjam
Copy link
Owner

stepjam commented Nov 9, 2023

Hi all. I have an update on this.
Thanks to the incredible work that @Coppelia and others have done in V4.6, it is now much easier for me to upgrade PyRep, and because of that, RLBench. This is great timing, as usage of PyRep and RLBench only seems to be growing. No promises, but I'll try and aim to have these updated done by end of year.

@Coppelia
Copy link
Collaborator

@stepjam, wanted to contact you as soon as last few major bugs in V4.6 were fixed, which seems to be the case now. I'd be happy to help out, especially porting existing scenes (e.g. object names for handle retrieval are deprecated in favor of path/alias or IK, collections, etc. should now exclusively be set-up programmatically, not via the GUI)

@Jrobo
Copy link

Jrobo commented Jan 18, 2024

After running simple example program RL bench, copelliasim is opening with scene, but after 1-2 second it closed with the following error:
QObject::~QObject: Timers cannot be stopped from another thread
QMutex: destroying locked mutex
any way to solve it?

@wpumacay
Copy link
Contributor Author

wpumacay commented Jan 19, 2024

Hi @Jrobo. Uhmmmm, that message appears usually after CoppeliaSim is terminated via pyrep shutdown. Are you using the version of Coppeliasim supported by PyRep? (v4.1), or are you using another version?

@Jrobo
Copy link

Jrobo commented Jan 21, 2024 via email

@wpumacay
Copy link
Contributor Author

@Jrobo , could you create a separate issue?. In the meantime, are you able to run the example_youbot_navigation.py example? That at least should show something

@stepjam
Copy link
Owner

stepjam commented Jan 22, 2024

Just an FYI that I started the work on the upgrade to 4.6 on the weekend. I expect to have a beta version (which does not include IK) by end of next weekend.
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants