-
Hello all, I recently started working on a swarm project with the Crazyflie 2.1 quadcopter. Using the excellent and very helpful Crazyswarm ROS package, I have been able to successfully fly 4 CFs to custom waypoints by modifying several scripts from the Crazyswarm ROS package. However, for the script to work as intended, I currently have to specify the real starting positions of the CFs in the inertial frame using the allCrazyflies.yaml file. What I want to be able to do is to fly the 4 CFs to custom points in 3D space without hardcoding their initial positions. That is, can I programmatically obtain the real-time position data of the CFs using either the Crazyswarm ROS package or cflib to use that in the script instead? I have read through the Crazyswarm and cflib docs without any luck. I also tried using the methods in the I am using the V1 Lighthouse Positioning System for external localization. Any help will be appreciated! Many thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
LightHouse is decentralized tracking, so the PC does not know by default the current positions. You can set |
Beta Was this translation helpful? Give feedback.
LightHouse is decentralized tracking, so the PC does not know by default the current positions. You can set
enable_logging
andenable_logging_pose
to true in the launch file, which will create topics likecf<id>/pose
containing the current state information. In your script, you can then useposition()
or subscribe to the topic manually if you need velocities as well.