-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Inconsistency in frame transformations #390
Comments
|
Are you suggesting I apply some sort of transformation in the application or are you suggesting a fix for mavros? If I understand the last set of reference frame changes from issue #216 then in theory one should be able to write an app that listens on the local_position topic which should give you an orientation in ENU and if I take that same pose without any translations and publish it to the setpoint_position topic then I would expect the UAS to not change position or orientation since I just told it to go the to the very same pose that it told me it was at. That does not appear to be what is happening. The yaw values I am getting from the local_position topic do not appear to have the 90 degree translation that is described in #216 in the local_position topic (i.e. NED->ENU), especially since it seems to be getting applied when you publish to the position_setpoint topic (i.e. ENU->NED). Thats where I think the inconsistency in mavros is. I'll take a closer look at the mavros code to make sure I'm not doing something stupid, but do people agree with my basic premise that I should be able to take a pose received from the local_position topic and send it to the setpoint_position topic without it changing the vehicle position or orientation? |
Well if you are feeding the orientation back through setpoint_point position directly I suppose it should work. Others already used this code with success so I can't point this is an inconsistency on mavros. I also tested it on ROS SITL with success. So I suppose there must be something wrong on what you are doing. |
Fair enough. Before I dig too deep I just want to make sure that my basic premise about feeding the local_position pose into the setpoint_position should work in principle especially since my code base use to work just fine and now it doesn't since I upgraded to the more recent version of mavros. In what file are the routines get_attitude_orientation() and transform_frame_enu_ned defined? |
Can you provide details on your software setup, particularly Motive version? The frames are are refering to are body fixed frames (ie both use X as forward). See #49. |
I use NaturalPoint Tracking Tools version 2.3.3. This runs on Windows and will stream the rigid body information to an Ubuntu computer running ROS. There the package mocap_optitrack will collect the streamed data and publish the pose on a ROS topic. The OptiTrack ENU frame I am referring to is the frame as it is published on the ROS topic by mocap_optitrack. |
Which branch of mocap_optitrack are you using? |
I work on it with somebody else and I copied the package from him so I can't see it directly in git. But I compared my package with the master branch using diff command and my version is the same as the master. |
Updates? |
There appears to be an inconsistency in the frame transformations between the poses that are returned by the local_position and what is sent to setpoint_position that was introduced with the last set of frame of reference changes a couple of months ago. Below are the transformations that are done in the corresponding plugins:
LocalPositionPlugin
SetpointPositionPlugin
auto p = UAS::transform_frame_enu_ned(Eigen::Vector3d(tr.translation()));
auto q = UAS::transform_frame_enu_ned(Eigen::Quaterniond(tr.rotation()));
It appears that you can not take a pose received from the local_position topic and feed it back to the setpoint_posiition without it causing the vehicle to change its yaw. Perhaps I'm missing something, but that seems incorrect.
The text was updated successfully, but these errors were encountered: