Repository navigation
Replies: 1 comment 1 reply
|
The motion capture use has no influence on the setpoint, only on the state estimates. You could try this by using Crazyswarm2 also just with a flow deck. My guess is that the setpoint is updated in two tasks in the firmware. For example, if you use "takeoff" in Crazyswarm2, this automatically switches the flight mode to "high-level", which internally generates setpoints on-board the firmware. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I added a piece of code in the Crazyflie firmware such that modifying a parameter triggers the following control:
setpoint.mode.z = modeAbs;
setpoint.position.z = state.position.z;
setpoint.mode.x = modeVelocity;
setpoint.velocity.x = 0.5f; // m/s
setpoint.mode.y = modeVelocity;
setpoint.velocity.y = 0.0f;
setpoint.mode.yaw = modeAbs;
setpoint.attitude.yaw = state.attitude.yaw;
When using a Crazyflie with a flow deck, I can successfully trigger this control through CFClient, and the drone moves forward at a constant velocity of 0.5 m/s as expected.
However, when I use Crazyswarm2 with a motion capture system, I can modify the parameter and trigger the control, but the drone does not fly forward at a constant velocity. Instead, it moves erratically in some direction, and the forward speed is not the 0.5 m/s I set.
Is this because Crazyswarm2 does not support velocity control mode when operating in a motion capture environment? How can I solve this issue?
All reactions