Copter rotates 45 degrees after receiving velocity_cmd


#1

Hi everyone,
We tested sending velocity commands to our copter yesterday. It worked just fine, however the copter yawed ~45 degrees after the first velocity commands.
Are we doing something wrong?

Here the BASH-Script we used for testing:

#!/bin/bash

echo "Velocity 1,0,0"
rosservice call /flytos/navigation/velocity_set "{vx: 1.0, vy: 0.0, vz: 0.0, yaw_rate: 0.0, tolerance: 0.0, async: false, relative: false, yaw_rate_valid: true, body_frame: false}"

echo "Flying for 5 seconds"
sleep 5

echo "Velocity 0,0,0"
rosservice call /flytos/navigation/velocity_set "{vx: 0.0, vy: 0.0, vz: 0.0, yaw_rate: 0.0, tolerance: 0.0, async: false, relative: false, yaw_rate_valid: true, body_frame: false}"


echo "Velocity 0,1,0"
rosservice call /flytos/navigation/velocity_set "{vx: 0.0, vy: 1.0, vz: 0.0, yaw_rate: 0.0, tolerance: 0.0, async: false, relative: false, yaw_rate_valid: true, body_frame: false}"

echo "Flying for 5 seconds"
sleep 5

echo "Velocity 0,0,0"
rosservice call /flytos/navigation/velocity_set "{vx: 0.0, vy: 0.0, vz: 0.0, yaw_rate: 0.0, tolerance: 0.0, async: false, relative: false, yaw_rate_valid: true, body_frame: false}"



echo "Velocity -1,0,0"
rosservice call /flytos/navigation/velocity_set "{vx: -1.0, vy: 0.0, vz: 0.0, yaw_rate: 0.0, tolerance: 0.0, async: false, relative: false, yaw_rate_valid: true, body_frame: false}"

echo "Flying for 5 seconds"
sleep 5

echo "Velocity 0,0,0"
rosservice call /flytos/navigation/velocity_set "{vx: 0.0, vy: 0.0, vz: 0.0, yaw_rate: 0.0, tolerance: 0.0, async: false, relative: false, yaw_rate_valid: true, body_frame: false}"


echo "Velocity 0,-1,0"
rosservice call /flytos/navigation/velocity_set "{vx: 0.0, vy: -1.0, vz: 0.0, yaw_rate: 0.0, tolerance: 0.0, async: false, relative: false, yaw_rate_valid: true, body_frame: false}"

echo "Flying for 5 seconds"
sleep 5

echo "Velocity 0,0,0"
rosservice call /flytos/navigation/velocity_set "{vx: 0.0, vy: 0.0, vz: 0.0, yaw_rate: 0.0, tolerance: 0.0, async: false, relative: false, yaw_rate_valid: true, body_frame: false}"

Greetings,
Matthias


#2

Hi,

Are you testing it on a real drone?
If yes, you have not mentioned which autopilot firmware you are using and what is its version. What is the version of FlytOS? I have tried the same in FlytSim, but I can’t see such behavior. Have you tried the same on FlytSim.
What is the initial yaw of the vehicle before sending the command. Does the behavior change if initial yaw is different.


#3

Hi there!

We are using ArduCopter 3.5 on a real copter. FlytOS is the latest version running on the intel edison (the provided image works great by the way!): 1.41.
Initial yaw is 0 when the command is send. I’ll get the log from the copter!

Greetings,
Matthias


#4

Hi there,

Here is the log file! Maybe you can have a look again!
https://drive.google.com/file/d/0BzOP3cwnlErnVUNDeWpvd2hrODA/view?usp=sharing

Greetings,
Matthias


#5

Hi,

If your version is less than 1.5-0,
Can you please get the flytos updated to latest 1.5-2 please?

I am anyway looking at your log now, to look for any issue.


#6

Hi,

I went through your log, and i could only see a vehicle yaw abruptly when shifted from LOITER MODE to GUIDED MODE. Within GUIDED I did not see any disturbance in yaw.

It would be great if you could tell me the start time of the unwanted yaw behaviour.

Also, can you please try this suggestion -> Use poshold mode instead of loiter mode and check if you still get yaw issue.


#7

Moreover were you able to replicate this behaviour in FlytSim?


#8

Hi there,

It was not quite directly after switching from LOITER to Guided mode
Unfortunately I wasn’t able to reproduce it in flytsim! We fly the copter manually and then switch to guided mode and send the commands to the copter approximately 5-10 seconds after switching to Guided. After receiving the command it yaws!


#9

Can you try sending pos sp command instead of vel sp command.
Also please share the autopilot log again.


#10

Hi there,

Here’s the link again: https://drive.google.com/open?id=0BzOP3cwnlErnVUNDeWpvd2hrODA

As the copter should be deployed in an already existing use case, it has to perform as expected when receiving velocity commands, that’s the problem right now.


#11

Hi,

It seems you have shared the same log again. Do you have a new log, or can you spot at what time you are seeing the yaw issue.

By this I meant only trying this for debug purposes, to check if the problem still persists, because we are not being able to replicate this issue at our end.

Please attach the output as you see in your bash terminal when you run your script.

Moreover the APM firmware you are using, is it the latest stable, what is your version? Are you using a specific branch, and have you made any change to APM code for your use case?


#12

Hi there,

Sorry I missed out to answer.

Upgrading to the recent Arducopter 3.5.3 fixed our issue!

Greetings,
Matthias Riegler


#13

Thanks. Closing this issue now.


#14