Closed whoenig closed 2 years ago
Steps (in teleop.cpp):
virtual single integrator
, that is i) introduce a state that tracks desired x,y,z, yaw and velocities (vx, vy, vz, omega_z), ii) On a joystick (axis) change, interpret the changes as a velocity input (i.e., vx, vy, vz, and omega_z) and update the desired position (using euler-integration).cmd_full_state
message and send it at regular intervals (e.g., 100 Hz), similar to how cmd_vel
is currently handled.Note: Start by initializing the the desired state with all zeros. Later, we need a smarter way to handle takeoff/landing and only allow the cmd_full_state control after takeoff.
Fixed in PR #15.
Currently, teleoperation only supports low-level flight, where a user controls roll, pitch, yawrate, and thrust. It would be nice to have a mode where a user controls the position (+velocity) setpoint instead. Ideally, one can also specify a "safe bounding box", so that it is impossible to crash the quadrotor.