{"action":"created","issue":{"url":"https://api.github.com/repos/diydrones/ardupilot/issues/2447","labels_url":"https://api.github.com/repos/diydrones/ardupilot/issues/2447/labels{/name}","comments_url":"https://api.github.com/repos/diydrones/ardupilot/issues/2447/comments","events_url":"https://api.github.com/repos/diydrones/ardupilot/issues/2447/events","html_url":"https://github.com/diydrones/ardupilot/issues/2447","id":90309631,"number":2447,"title":"Copter: Add support for MAV_FRAME_BODY_NED in SET_POSITION_TARGET_LOCAL_NED","user":{"login":"hamishwillee","id":5368500,"avatar_url":"https://avatars.githubusercontent.com/u/5368500?v=3","gravatar_id":"","url":"https://api.github.com/users/hamishwillee","html_url":"https://github.com/hamishwillee","followers_url":"https://api.github.com/users/hamishwillee/followers","following_url":"https://api.github.com/users/hamishwillee/following{/other_user}","gists_url":"https://api.github.com/users/hamishwillee/gists{/gist_id}","starred_url":"https://api.github.com/users/hamishwillee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamishwillee/subscriptions","organizations_url":"https://api.github.com/users/hamishwillee/orgs","repos_url":"https://api.github.com/users/hamishwillee/repos","events_url":"https://api.github.com/users/hamishwillee/events{/privacy}","received_events_url":"https://api.github.com/users/hamishwillee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/diydrones/ardupilot/labels/Copter","name":"Copter","color":"02e10c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-23T07:12:24Z","updated_at":"2015-08-12T00:43:31Z","closed_at":"2015-08-11T23:53:44Z","body":"[SET_POSITION_TARGET_LOCAL_NED](https://pixhawk.ethz.ch/mavlink/#SET_POSITION_TARGET_LOCAL_NED) allows you to send commands for position and velocity control. \r\n\r\nThe message definition supports a number of frames: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED. \r\nHowever as far as I can tell it doesn't matter what you use, parameters are interpreted as relative to the home location.\r\n\r\nI don't actually understand what the frames really mean! But:\r\n\r\n* For position control, it would be very useful if we could have a frame that allows us to set position relative to the vehicle - ie \"go 10m north and 20 metres west\" rather than having to translate decimal degrees. Having variants where the altitude is relative to the current vehicle position or above ground level would also be useful\r\n* For velocity control I'm not so sure. I imagine though it would be useful to be able to apply velocity vectors aligned with the front of the vehicle. I'm thinking \"ease of defining a straffing path\". \r\n\r\nThe velocity idea is is theoretical, the dronekit examples haven't needed it yet. The position case is a real problem, for which I ended up having to write my own translation code."},"comment":{"url":"https://api.github.com/repos/diydrones/ardupilot/issues/comments/130123556","html_url":"https://github.com/diydrones/ardupilot/issues/2447#issuecomment-130123556","issue_url":"https://api.github.com/repos/diydrones/ardupilot/issues/2447","id":130123556,"user":{"login":"hamishwillee","id":5368500,"avatar_url":"https://avatars.githubusercontent.com/u/5368500?v=3","gravatar_id":"","url":"https://api.github.com/users/hamishwillee","html_url":"https://github.com/hamishwillee","followers_url":"https://api.github.com/users/hamishwillee/followers","following_url":"https://api.github.com/users/hamishwillee/following{/other_user}","gists_url":"https://api.github.com/users/hamishwillee/gists{/gist_id}","starred_url":"https://api.github.com/users/hamishwillee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamishwillee/subscriptions","organizations_url":"https://api.github.com/users/hamishwillee/orgs","repos_url":"https://api.github.com/users/hamishwillee/repos","events_url":"https://api.github.com/users/hamishwillee/events{/privacy}","received_events_url":"https://api.github.com/users/hamishwillee/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T00:43:31Z","updated_at":"2015-08-12T00:43:31Z","body":"@rmackay9 Thanks very much. \r\n\r\n[Here you translate the velocity vector between frames](https://github.com/rmackay9/rmackay9-ardupilot/blob/231461abd602326ea823eed45a9859e809aa3399/ArduCopter/GCS_Mavlink.cpp#L1498). Can you explain the difference - I think that in the local frame vx, vy, vz are NED, but in the body frame they are relative to the axes of the body (ie if the vehicle was on its side, then the \"D\" would follow the vehicle axis, not gravity)\r\n\r\n"}}