Using getParam() with CrazySwarm
Posted: Tue Dec 14, 2021 2:19 pm
Hello!
I am currently an engineering student working on implementing risk-based avoidance algorithms on the CrazyFlie using the CrazySwarm packages.
For my application, I will need the position AND velocity of the drone and an arbitrary obstacle. My implementation works well in simulation since there is a specific function for velocity (cf.velocity()), but I haven't found a great substitution for this function when actually running the python script to the drone.
One idea is to access the state estimate log parameters (stateEstimate.vx, stateEstimate.vy, etc.) but I'm not sure how to use the getParam function properly, and I'm not sure that this is the best method for accessing velocity.
I should note that I am using cmdVelocityWorld to stream continuous updates, so another option is to numerically derive velocity with each loop iteration.
I'm sure there are multiple ways to get this done so I'm mainly wondering which method seems most appropriate to others.
I am currently an engineering student working on implementing risk-based avoidance algorithms on the CrazyFlie using the CrazySwarm packages.
For my application, I will need the position AND velocity of the drone and an arbitrary obstacle. My implementation works well in simulation since there is a specific function for velocity (cf.velocity()), but I haven't found a great substitution for this function when actually running the python script to the drone.
One idea is to access the state estimate log parameters (stateEstimate.vx, stateEstimate.vy, etc.) but I'm not sure how to use the getParam function properly, and I'm not sure that this is the best method for accessing velocity.
I should note that I am using cmdVelocityWorld to stream continuous updates, so another option is to numerically derive velocity with each loop iteration.
I'm sure there are multiple ways to get this done so I'm mainly wondering which method seems most appropriate to others.