[SOLVED] ArduCopter SITL Dronekit Movement Commands Doesn't Work

Hi. I’m fairly new to the community. I installed Ardupilot on Linux(Ubuntu 20.04 LTS), compiled and all. It works perfectly fine but the problem is the Dronekit movement commands doesn’t work. (I’m talking about these commands i.e)
I’m sure nothing is wrong with the code since It works on someone else

Dronekit doesn’t have movement commands but can be used to sent those mavlink command messages to vehicle.
Copy paste your code for us to take a look.

Here is the code
It generates mavlink messages so I don’t know the reason why this problem occurs

Are you on the latest 4.2Dev master?

I guess but just to make sure, How can I check the version?

Print this out for me: git status

Sorry do get git log
Then copy and paste the SHA1 Example below

commit 2fb939a1cae0a60f478963094431c3b07e6b475a (HEAD, tag: Copter-4.1.3, Copter-4.1)
Author: Randy Mackay <rmackay9@yahoo.com>
Date:   Fri Dec 31 14:01:03 2021 +0900

    Copter: version to 4.1.3

Update your master branch it is from November. I relaxed a condition on the receipt of those commands I had added in master after November.

so on your master branch (use whatever you have named your ardupilot upstream remote)
git pull ARDUPILOT_UPSTREAM master

Might as push that back to your master,
git push origin master

The above assume origin is pointing to your own clone of the repository.

You know which remote name to use if you use:
git remote -v

veritas@DESKTOP-V9LAGA3:~/ardupilot$ git remote -v
ardupilot       https://github.com/ArduPilot/ardupilot.git (fetch)
ardupilot       https://github.com/ArduPilot/ardupilot.git (push)
origin  https://github.com/hendjoshsr71/ardupilot.git (fetch)
origin  https://github.com/hendjoshsr71/ardupilot.git (push)
1 Like

Thanks. I solved the problem by cloning master git site with git again. The problem was the files that I forked and it seems like it didn’t quite work.

Note the issue was that there is an odd bit in the TYPE_MASK field for “Interpret Acceleration as Force,” in those messages that we were protecting against.

You could have also changed the typemask to be, 0b0000010111000111, and it should have worked. But being up to date on master is good when doing simulator stuff.

Just to be on the same page, your code actually gives velocities at the axes, not move some distance.
Your code says moving at the axes but actually you’re giving velocities.
You can take a look at for velocity only, position only and position & velocity commands.