aidudezzz / deepbots

A wrapper framework for Reinforcement Learning in the Webots robot simulator using Python 3.
https://deepbots.readthedocs.io/
GNU General Public License v3.0
236 stars 50 forks source link

Request for Assistance with Sim2Real Transformation Using Emitter Receiver in DeepBots #152

Open abdul-mannan-khan opened 9 months ago

abdul-mannan-khan commented 9 months ago

Hello Aidudezz/Deepbots,

Thank you for sharing this amazing support repository for WeBots RL simulation. I am wondering about Sim2Real transformations, specifically within the context of using emitter-receiver configurations in DeepBots. I am seeking guidance or any helpful resources that could steer me in the right direction for this endeavor.

My current project involves a Sim2Real transformation where I am attempting to bridge the gap between the simulated environment and the real-world application using a setup based on DeepBots. I am particularly focused on understanding and implementing the emitter-receiver functionality effectively for this transition.

As a beginner in this area, any advice, tutorials, or shared experiences would be incredibly valuable to me. I am especially interested in any best practices or common pitfalls to avoid during this process.

Thank you in advance for your time and assistance. Your insights will be greatly appreciated and will surely contribute significantly to my learning journey in this exciting field.

KelvinYang0320 commented 9 months ago

@abdul-mannan-khan Hi, thanks for opening the issue. 😄 We have some tutorials here. https://github.com/aidudezzz/deepbots-tutorials Feel free to let us know if you need any assistance. We'll be happy to help.

abdul-mannan-khan commented 9 months ago

Hello @KelvinYang0320, Thank you for your response. I have gone through the tutorials (https://github.com/aidudezzz/deepbots-tutorials). However, I am still confused about the Sim2Real transformation procedure. Do you have any examples in it that describe how to shift Deepbots based RL algorithm to a physical system? In general, we connect with the simulation engine through some connection by calling a function (like Gym PyBulle engine). Our actions are executed by the simulator engine, and then when our training is finished, instead of calling the simulation engine, we connect it to the physical system. However, based on my understanding, we are just making a webot (.wbt) file where we are setting all the configuration, which calls WeBots. How can I shift it from calling WeBots to a physical system?

Thank you for your help. I am very grateful to you.

KelvinYang0320 commented 9 months ago

@abdul-mannan-khan Umm, I don't have experience with transfering a deepbots to a physical system. @eakirtas @tsampazk Could you share some ideas? Thank you!

tsampazk commented 9 months ago

Hello @abdul-mannan-khan, thank you for your interest in deepbots!

Since deepbots targets mainly the Webots simulation we cannot provide specific instructions on how you can transfer it to real robots, etc. Deepbots is intrinsically tied to Webots because this is its purpose. Depending on your use-case, you might find that setups with emitter-receiver can be easier to translate to physical systems as you are already doing. It heavily depends on your use-case.

However, assuming you want to run inference on a real robot using some generic system and a simulation-trained agent, you can strip down the environment you have created using deepbots, and replace the methods that for example grab the sensor data and run the motors (observation, action), load the trained agent and run inference using the observation data so you have a simple form of the RL loop deployed. Again, the specifics are heavily depend on your use-case, e.g. it will be quite different to do this using ROS to using a Lego Mindstorms robot.

I hope this proves helpful!