-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Ardupilot #6
base: main
Are you sure you want to change the base?
Conversation
[Note this is not actually complete yet xD I was hoping you might be able to provide some input as to how to get an AP drone flying 🤣 ]
|
I suspect this is caused by the interference of the SITL default rangefinder. In |
|
I think it's actually this part: if (takeoff_alt_cm <= copter.rangefinder_state.alt_cm) {
return false;
} The altitude reported by the SITL range finder under Gazebo seems to be constantly the maximum, here 5000cm or 50m |
Is there even a rangefinder on the model? Where do the rangefinder measurements come from? |
Not entirely sure, I think there is a rangefinder simulator built in to the SITL binary itself which may be being used? |
Now that the vehicle can take off, there still appear to be problems... Lots of "Waiting for Navigate" messages. I've added a branch to disable the rangefinder for the ArduPilot SITL in the main repo. Once that is built, you can use |
The waiting for navigate messages are that thread blocking until the drone has reached the navigation target. If you want a quick way of running, call the navigate service directly with argument |
Do you observe the drone moving around on gazebo? |
It gets off the floor but just stays hovering at 2m |
Now it takes off, then hovers in place while I assume the trajectory follower goes round the trajectory, then lands. |
Hmm sometimes it takes a little bit to stabilize after takeoff for it to trigger the 'i'm here'... |
The not moving was likely caused by the (recently fixed) error in the bridge yaml files. However, using nightly where the fix is implemented results in no takeoff again. My guess is that sending the setpoints somehow disturbs the takeoff sequence. With no setpoints being sent, the takeoff completes, if setpoints are sent, the vehicle doesn't leave the ground... |
This PR adds support for ardupilot.
Primary change is for enabling GUIDED mode, and the requirement (I think) to takeoff before setpoint_position is accepted.
Still WIP, Ardupilot vehicle arms, switches to guided mode, but will not takeoff. Currently returns a 4 status on takeoff
pointing to Coordinate frame not supported (https://mavlink.io/en/messages/common.html#MAV_CMD_ACK_ERR_NOT_SUPPORTED)