PoseStamped subscription and pose/position getters to Crazyswarm2 (ROS 2)

The problem i noticed in crazyflie.py Library inside is that the Current Crazyswarm2 API from IMCRC is that it does not subscribe to Pose/PoseStamped and therefore cannot provide live pose data to client scripts.Even though an inbuilt function was seen,It wasnt publishing the position data as expected.So i have come up with a solution which contains PoseStamped import, a subscriber to f’{prefix}/pose’, a callback to update internal state, and public get_pose()/get_position() accessors.details can be seen in the file that Ive added along.
The benifits include Standard ROS 2 pose interface for downstream nodes, simpler integration with planners/visualizers, and parity with status exposure.It is also backward compatible.
Thank you and hope this will help those who are developing and testing algorithms using crazyswarm.

Link for the updated repo:GitHub - IMRCLab/crazyswarm2: A Large Quadcopter Swarm

1 Like

It’s great that you were able to get this extra functionality and that you’re sharing it. This is a place where some people will find it. However I’d strongly encourage you to open a pull request against the upstream repository( Pull requests · USC-ACTLab/crazyswarm · GitHub) where the improvements can potentially be added to the core and then everyone who uses the default can get them. They can also review your changes and potentially suggest improvements too.

Yes I had done the pull request and the feature was added onto the main repo.
link:crazyswarm2/crazyflie_py/crazyflie_py/crazyflie.py at main · IMRCLab/crazyswarm2 · GitHub

1 Like