Hi all,

is there a way to control the yaw orientation / heading of the copter during a mission? As far as I have tested, the copter always points to the next mission waypoint and flies "forward". Even though you can enable "simple mode" with auto it seems to have no effect.

It would also be nice to be able to set the yaw orientation for every waypoint. The MAVLink protocol has a field for that.

Anyways having the copter maintain a fixed yaw orientation during a mission would help me a lot. Is there a way this can be done?

Greetings
Niklas

 

Views: 596

Reply to This

Replies to This Discussion

 

Very interesting point, i didn't tried to change Yaw orientation during auto fly yet. The Yaw stick has no effect ?

 

This would be very usefull for video filming.

Hi Niklas

 

There are two commands in the Flight Planner section of the Mission Planner software which look like they do what you need.

 

DO_SET_ROI

 

Yaw tracking option ALtitude (in meters) Latitude Longitude

 

  • Setting will persist until reboot
  • The location is optional
  • The option is a number from 0 to 4
  • MAV_ROI_NONE = 0: Yaw will hold it's current angle
  • MAV_ROI_WPNEXT = 1: Yaw will point at next WP
  • MAV_ROI_WPINDEX = 2: Yaw will point at the desired WP at the index #
  • MAV_ROI_LOCATION = 3: Yaw will point at the indicated location (The location in the command)
  • MAV_ROI_TARGET = 4: Not implemented

 

 and

 

CONDITION_YAW

 

Option Alt Lat Lon
Direction (1 = clockwise, 0 = counter) Relative: amount (degrees), Absolute: ending angle(degrees) Speed (meters/s) Relative angle change = 1, Absolute = 0

 

  • Fine grain controls of the Yaw

 

 

I have no experience using it but plan to soon.  You can find the manual for Mission Planner here.

 

NOTE: The current version of Mission Planner (1.0.94) pops up the following warning when starting up ...

... so use the scripting with caution.  Micheal Obourne releases several updates per week (Thanks Micheal, fantastic software!) at the moment so shouldn't have to wait long for a version without this warning ;o)

 

Good luck, let us know how it goes...  Perhaps a video too!

Yes, you need to add a command called MAV_CMD_DO_SET_ROI. 

the main value to set is MAV_ROI_NONE, or 0 if you need to enter a number.

 

i have been playing around with this and in my opinion it is currently broken, all my attempts to use DO_SET_ROI orient arducopter to the set waypoint but stop execution of the rest of the mission.

i mean to look into this, and have spotted a couple of lines of code in commands_logic.pde that look a bit suspect.  i dont have a simulated environment to test but think that do_target_yaw() should be:

yaw_tracking = MAV_ROI_LOCATION;
target_WP = command_cond_queue.p1;

instead of:

yaw_tracking = command_cond_queue.p1;

if(yaw_tracking == MAV_ROI_LOCATION){
 target_WP = command_cond_queue;
}

james

I have set everything up and are happy to test it. How do you get the DO_SET_ROI command? I don't have that in the mission planner!?

Niklas

currently i dont have access to the netbook with my recent mission scripts, this afternoon when i get home i will find a good one and post the .txt here.

 

looking at MP 1.1.80 loading a much older script it seems the DO_SET_ROI option is being read simply as "ROI" - i dont trust this mission script enough to post it here, it could contain other errors.

 

james

 

It seems to me that the ROI and DO_SET_ROI commands are different. Even the DO_SET_ROI is not available in mission planner (v 1.1.83) you can add it by adding

    <DO_SET_ROI>
        <P1>Yaw_Mode</P1>
        <P2>altitude</P2>
        <x></x>
        <y></y>    
    </DO_SET_ROI>

into mavcmd.xml. The command is correctly mapped in MAVLinkTypes0.9.cs to command ID 201 as defined here:

https://groups.google.com/forum/#!topic/mavlink/IGSTceP3g2s

However, planning a mission with his command has no effect at all.

this is a mission created by mission planner a month or two ago, the second line is a SET ROI command.  it didnt work then and it doesnt look very convincing now ..

Attachments:

yes, this was expected. it looks like you are using the ROI command and not the DO_SET_ROI. I attached a mission that does a DO_SET_ROI. To create the mission you have to add the command to mavcmd.xml in mission planner (see above).

I am not sure but I find the behavior of the DO commands rather strange. The command (testet with DO_SET_ROI and DO_JUMP) are only executed if there are at least 2 additional waypoint commands.

Anyways, for now I have change the default behavior in commands.pde from

 yaw_tracking             = MAV_ROI_WPNEXT;

to

 yaw_tracking             = MAV_ROI_NONE;

This gives me the desired behavior for loiter as well. There should be a global parameter in the settings for yaw tracking.

Attachments:

ive been a bit slow replying here, sorry.  i really need to get the simulator running and play around with this.

 

what changes do you have running at the moment, just the xml modification to load the DO_SET_ROI command and the change in default yaw_tracking value?

 

 

Thank you very much for the help. I have been playing with the CONDITION_YAW command quite a bit. The DO_SET_ROI command has disappeared in the current version of mission planner.

My findings for CONDITION_YAW are however that no matter what I set, only 0s get written to APM. The result is that the copter always points north.

Wouldn't it be the best to use the yaw angle parameter in the waypoint command for this purpose? This if course only works for copters and needs to be ignored by fixed wings.

Dear all,

after sometime I am giving this another try. However, I am having not much success. Is there any way to keep the orientation during the execution of a mission? Is there some parameter I can change to keep arducopter from orientating toward the next waypoint?

Any hint is welcome!

Niklas

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service