-
Notifications
You must be signed in to change notification settings - Fork 980
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
Controling Yaw axis with "off-board" mode #627
Comments
http://mavlink.org/messages/common#SET_POSITION_TARGET_LOCAL_NED You should also add velocity ignore bits, yaw is in radians, yaw_rate is radians/second. |
Thank you for the fast replay.
Thanks again |
I have the same problem! |
What firmware used? Version? I'm not sure that coordinate_frame really used, and fix to FRAME_LOCAL_NED. |
I am glad to see i'm not the only one. Maybe we are on to real bug here. |
@vooon My last px4 update was from Sept 29. Do you know of any major recent changes that would affect the attitude control? I am not using MavProxy. I'm just using mavros/gazebo This is the message documentation: http://docs.ros.org/jade/api/mavros_msgs/html/msg/PositionTarget.html Any tips? |
@vooon I don't know if this is part of the problem, but: I am publishing on this topic:
|
Mavros raw plugin really only support FRAME_LOCAL_NED, since frame conversion done for local ENU-NED. |
So next place is firmware source, as that place where come all loopback. |
@vooon Should I be flipping the yaw I command to be ENU then? Or is that done in the firmware? I'm really confused, and I'm noticing that the yaw I command vs the yaw that the copter settles at seems to be offset by 90 degrees ... |
@vooon I was looking here: http://docs.ros.org/indigo/api/mavros/html/mavros__uas_8h_source.html
Both of these call the same function. Additionally, here: http://docs.ros.org/indigo/api/mavros/html/setpoint__raw_8cpp_source.html |
ROS standard frame is ENU. I'm not sure now that ned-enu function is right. |
@vooon I do need to use indigo (for compatibility with other packages). Is this going to be a problem? |
@vooon I checked the MAVLink Inspector widget as I was running the node. The commanded yaw from mavros is identical to the commanded yaw in MAVLink. So where does the conversion occur? Did you look into this / is there a problem with either how I command the yaw angle or how the ENU to NED conversion is done in firmware? cc: @eric1221bday |
@csorice147 You can install version 0.18.5 on Indigo as well, worked for me (using catkin_make_isolated because MAVLink is not a catkin package and following this guide) |
@elhayr1 have you successfully send yaw rate commands using your method in comment? |
@csorice147, apparently code was fine. The drone I used in gazebo simulation didn't support yaw movement |
You can try to use the iris one, it supports yaw movement :D |
@elhayrobotican wich drone did you use? |
@elhayr1 and @cs147 is this solved for you both? |
Closing this as there's no feedback. Please reopen if needed. |
Is there a mavlink command to control yaw rate? |
@mandelyoni Yes you can control yawrate; but you have to control 4 components of the copter: X, Y, Z and yaw, if you do not; what should your copter do? |
I would like to control all the angle rates and the thrust. I close the position loops by myself. |
@mandelyoni if you want to control the rates and the thrust you can either use |
Hi, Did you try this on a drone? With Mavros or Mavlink? Thanks, Yoni. |
https://github.com/PX4/Firmware/blob/master/src/modules/mavlink/mavlink_receiver.cpp#L1319-L1339 If you are doing things right, this would work. |
Dear TSC21, I did everything according to handle_message_set_attitude_target. Thanks, yoni. |
@mandelyoni The following is the code relative to attitude_target on the PX4. |
Hi, |
@mandelyoni please stop spamming the issues lists. You are not getting your problem solved faster that way. |
Hello, I am also trying to achieve control of the IRIS drone, by setting body rate and thrust commands through the After looking at the documentation of the So far I have not been successful, although I can control the IRIS drone in RotorS simulator by using my own low level controller (rotor speeds) and the same high level controller (thrust and body rates) I am trying to use with PX4+MAVROS. Thanks for any answers! |
@juanmed What is the input for the other axis? In offboard mode, you are supposed to send the full setpoint. Instead, use /mavros/setpoint_raw/local, this will allow you to give the following controls: position, velocity, acceleration for X,Y,Z and position and velocity for yaw. Also, please do such tests in simulation first. That will avoid crashes. |
@AlexisTM Thank you for your reply. Sorry but what do you mean by 'the other axis' and 'the full setpoint'? It seems I am missing something. I am sending And I am doing all this in simulation in gazebo using PX4 SITL. Thanks for the advice. |
@juanmed Hi, does this mean that you have issues running mavros_controllers ? The questions you are asking seems to be implemented in |
@Jaeyoung-Lim Thanks for your reply. mavros_controllers works perfectly and has been a very good reference. It is my implementation, in which I use different controllers, that is not working as smoothly. |
Hi,
I am trying to control all axes of quad-copter. While I was able to control x,y and z axes, I could't figure out how to control x axis. I tried many code combinations and also searched the internet several times, and ended up trying to use 2 different topics: one for controlling x,y,z , and the other for controlling yaw, but I still can't control yaw. This is my code so far:
Since I am pretty much stuck, any help would be great.
Thanks a head!
The text was updated successfully, but these errors were encountered: