cyberbotics / webots_ros2

Webots ROS 2 packages
Apache License 2.0
402 stars 148 forks source link

Add crazyflie webots packages #872

Closed knmcguire closed 9 months ago

knmcguire commented 10 months ago

Description This adds the Crazyflie to the ROS2 distribution of webots

Related Issues This will mostly fix an external issue namely https://github.com/bitcraze/crazyflie-simulation/issues/49

Affected Packages None, it will just add a new one namely webots_ros2_crazyflie

Tasks These are still remaining tasks or mostly questions before the pull request can be considered mergable

Update: The tutorial will be done on the ROS documentation once the binary is available. The more complex example will be added later

Additional context Here are some questions for those reviewing this PR

omichel commented 9 months ago

Sorry for my late answer, I missed your post on Discord.

That's perfectly fine if you make a tutorial on your own website. However, I would recommend making a tutorial directly on the official ROS 2 documentation as it will have a much better impact. Maybe you could create a subsection in this section: https://docs.ros.org/en/iron/Tutorials/Advanced/Simulators/Webots/Simulation-Webots.html (do you see the "Edit on GitHub" link?).

It is OK to make a more complete example later on. However, this PR should be self-sufficient, e.g., it should provide something useful to the user, without any missing component. But I believe it is the case, isn't it?

knmcguire commented 9 months ago

No worries :) there is not a hurry on it and I see I need to fix quite a lot of CI issues anyway.

Ah yes that might an even better option to add it to ROS documentation. I was looking for an alternative for the wiki on the github repo that now currently exist but is a bit invisible.

The current example is already useful in the way that it is controllable by teleop twist and it outputs scans and a transform. for the more complex example that I wanted to include already is to connect this to the simple mapper that was made for the epuck, but I hit some issues with that along the way when I tried to combine the two. But perhaps this is already a big enough PR as is and I can contribute the complex example later.

I'll fix the CI issues next week and mark it as ready for review then.

knmcguire commented 9 months ago

Ah seems like the CI's pass now after a rerun, except for one on which both develop and master is failing on themselves, but that doesn't have anything to do with my PR.

I'll mark it ready for review now!

knmcguire commented 9 months ago

Just a small thing that I noticed. Current the crazyflie's position is at approx (-5,-3) meters but I notice when I reset the simulator, the crazyflie is at (0,0), so a full reload is required. This seems to happen with webots without any involvement of ROS already... I'll see if I can investigate what is going on and report it for webots as an issue

knmcguire commented 9 months ago

Thanks! I'll merge. I've made an issue for the webots issue I've mentioned before: https://github.com/cyberbotics/webots/issues/6467

Also depended on when the package is released I'll make a tutorial in ROS documentation.