-
Notifications
You must be signed in to change notification settings - Fork 42
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
MavSDK-JAVA v2.0.1, INVALID_SEQUENCE for uploading mission with MissionRaw -- Kotlin Android #182
Comments
Is this against PX4 or ArduPilot? Can you make sure that Current is 0 for the 0th item, and 1 for the first one? Also see this thread: mavlink/MAVSDK#2058 |
This is against Ardupilot v4.4.4. I will try setting the current 0 for the 0th item, and when you mention current 1 for the 'first one'. Did you meant the TAKE_OFF message or the First WayPoint? Do you think it could be that MavSDK did not send the Total Count (MISSION_COUNT) for waypoint? Referencing "Upload a Mission to the Vehicle". |
|
I also tried the above and got Invalid Sequence INVALID_SEQUENCE |
I don't think so. I assume you're hitting this one: The sequence should be 0, 1, 2, 3, not 0, 0, 1, 2, 3, pretty sure. |
I also tried 0,1,2,3,4 sequence and got INVALID_ARGUMENT.
|
I am logging out messages MavSDK is receiving from Ardupilot. What I notice is I only received MISSION_REQUEST_INT for 0, which explain why I was able to upload mission with 1 Mission Item successfully. I've never receive MISSION_REQUEST_INT for 1 and failed to upload mission with 2 or more Mission Items. |
Do you think this might potentially giving us problem? mavlink_mission_transfer_client.cpp
|
Can you provide an example, or add a mission example to the example app? That way I can easily try to reproduce this issue. |
|
I got this as result "ERROR: INVALID_SEQUENCE: Invalid Sequence null" for the above code. |
What does this do?
Oh nevermind, got it. |
You write v2.0.0 but that version doesn't exist, so what version exactly are you using? |
Sorry, I meant v2.0.1 |
v2.1.0 maybe? |
To clarify: MAVSDK-JAVA (I pulled from the main branch in May, so it wasn't an official release yet)
|
While debugging, I noticed that the unregister_all function in the MavlinkMessageHandler class (in MAVSDK C++) is called when I try to upload the mission to the drone flight controller. This did not happen with the simulator and I was able to upload the flight plan successfully. |
Hm, so this issue still persists for SITL then? |
It is working when I upload mission to SITL. |
Nice ok, so I can close this. |
To clarify : It is always working with SITL but I've never get a mission to upload successfully on the actually Flight Controller with Ardupilot v4.4.4. I always got INVALID_SEQUENCE when try to upload to the actual Flight Controller. |
Ok, I understand, so this stays open and I need to try to reproduce it. |
Were you able to reproduce the issue? |
Not yet, thanks for the reminder. Easiest would be if you can make a branch of the example app that shows it. |
I am unable to upload a mission using MissionRaw. My mission have multiple MissionRaw.MissionItem, sample code below:
`
private fun createMissionPlan(): List<MissionRaw.MissionItem> {
val missionRawItems = mutableListOf<MissionRaw.MissionItem>()
// Set Home Point
missionRawItems.add(createMissionItemRaw(0, 1, 16, 1, 1,0f, 0f, 0f, 0f,0f, 0f,548.6f, 0))
// Take off
missionRawItems.add(createMissionItemRaw(1, 0, 22, 0, 1,0f, 0f, 0f, 0f,0f, 0f, altitudeM.toFloat(), 0))
// add two waypoints
missionRawItems.add(createMissionItemRaw(2, 0, 16, 0, 1,0f, 0f, 0f, 0f, latitude, longitude, altitude, 0))
missionRawItems.add(createMissionItemRaw(3, 0, 16, 0, 1,0f, 0f, 0f, 0f, latitude, longitude, altitude, 0))
return missionRawItems
}
private fun createMissionItemRaw(seq: Int, frame: Int, command: Int, current: Int, autocontinue: Int,
param1: Float, param2: Float, param3: Float, param4: Float,
x: Float, y: Float, z: Float, missionType: Int): MissionRaw.MissionItem {
`
I am able to upload the mission successfully with just only one MissionItem (e.g. home point). Whenever I try to add a mission with two MissionItems or more, I got Invalid_Sequence even thought my sequence number is correctly increment from 0.
Thanks for your help!
The text was updated successfully, but these errors were encountered: