bitcraze / crazyflie-simulation

MIT License
64 stars 27 forks source link

ros2-webots environment #49

Closed ntukenmez3 closed 5 months ago

ntukenmez3 commented 12 months ago

Do you have any useful guide to use this file via ros2? We would like to use webots environment and real cf2 together.

knmcguire commented 12 months ago

There is currently no standard webots support for ros2 and the crazyflie, but we hope to fix that in the future.

In the mean time, please take a look at the webots ros2 tutorial: https://docs.ros.org/en/humble/Tutorials/Advanced/Simulators/Webots/Simulation-Webots.html. that should have all the info you need to set something up.

Another option is to look at my crazyflie ros2 experimental project files: This will no longer maintained but perhaps you can take a look at how this was done for an older version of webots (is might already be outdated though). https://github.com/knmcguire/crazyflie_ros2_experimental

I would usually transfer questions like these to discussions, but since we would like to implement a standard package to ROS2 for webots crazyflie connection, I'll keep this open for now. The question is just if we would like include that in this repo or make a new one.

ntukenmez3 commented 12 months ago

Got it!

ntukenmez3 commented 12 months ago

That process would also be same for a real cf2? Because the only difference will be the environment.

knmcguire commented 12 months ago

kind off. You'll need to ofcourse also use different motor names and everything but that you can get from the crazyflie proto file (the webots description file of the crazyflie). You could also take some inspiration from the dji mavic ROS2 implementation of webots: https://github.com/cyberbotics/webots_ros2/tree/master/webots_ros2_mavic

ntukenmez3 commented 12 months ago

That link would be great for us since a different uav is used for simulation on Webots. I think most of the requirements would be same hopefully.

knmcguire commented 12 months ago

Yes I think so! let me know how it works out. That will help a future implementation of the ROS simulation.

mwlock commented 11 months ago

I have made a minimal example for launching a SIL driver in webots_ros2_crazyflie to replicate crazyflie_controller_py_firmware_pid.

Running the launch file will get the Webots simulator going as well :)

knmcguire commented 11 months ago

Thanks! @matthew-william-lock.

For the future webots ros2 implementation we can't really use the SIL controllers though since that requires the crazyflie firmware and don't think that the fox of cyberbotics likes such an external dependency. So probably for the first PR it will be the easy PID velocity controller that was written for this simulation

knmcguire commented 5 months ago

The ROS2 package for webots is now part of the development branch of webots_ros2. We just need to wait for the release.