Skip to content
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

condition_yaw does not work in python #1179

Open
kazmifactor opened this issue Jan 17, 2023 · 1 comment
Open

condition_yaw does not work in python #1179

kazmifactor opened this issue Jan 17, 2023 · 1 comment

Comments

@kazmifactor
Copy link

kazmifactor commented Jan 17, 2023

I am using the following function in python. Whenever I pass the paramters it does not work. other functions like arm_and_takeoff, set_velocity_body does work. So, there is nothing wrong with the integration of hardware and software.

If i want to yaw towards left for 30 degrees localy. i pass condition_yaw(30, -1, 1) or if i want to yaw 10 degrees to the right i pass condition_yaw(10, 1, 1),

If anyone have any idea what i am doing wrong, or if this is an issue with the function. pls do let me know.

def condition_yaw(heading, direction, relative):
    msg = vehicle.message_factory.command_long_encode(
        0, 0,  # target system, target component
        mavutil.mavlink.MAV_CMD_CONDITION_YAW,  # command
        0,  # confirmation
        heading,  # param 1, yaw in degrees
        0,  # param 2, yaw speed deg /s
        direction,  # param 3, direction -1 ccw, 1 cw
        relative,  # param 4, relative offset 1, absolute angle 0
        0, 0, 0)  # param 5 ~ 7 not used
    # send command to vehicle
    vehicle.send_mavlink(msg)
@Chepa14
Copy link

Chepa14 commented Mar 24, 2023

@kazmifactor Did you find a solution? I stuck with the same problem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants