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

[mavros_extras] mocap_estimate.cpp plugin #102

Closed
TSC21 opened this issue Aug 11, 2014 · 5 comments
Closed

[mavros_extras] mocap_estimate.cpp plugin #102

TSC21 opened this issue Aug 11, 2014 · 5 comments

Comments

@TSC21
Copy link
Member

TSC21 commented Aug 11, 2014

A plugin to connect to:
vicon_bridge: http://wiki.ros.org/vicon_bridge
or vicon_mocap: http://wiki.ros.org/vicon_mocap
Must have a tf_lookup to vicon/<subject_name>/<segment_name> or ~output depending on the pkg being used.

Msg to send: VICON_POSITION_ESTIMATE
https://pixhawk.ethz.ch/mavlink/#VICON_POSITION_ESTIMATE

Note: Possible OptiTrack support can be added and message sent through VICON_POSITION_ESTIMATE. It can be connected to http://wiki.ros.org/mocap_optitrack.

@TSC21
Copy link
Member Author

TSC21 commented Aug 11, 2014

To use APM, from what I read in a source, you must use the NMEA protocol, which is the protocol used by APM to get the GPS coordinates (considering that you are using a NMEA GPS internally in APM). Writing a C code that converts local positions to global position will do the job. Here's some reference: http://en.wikipedia.org/wiki/NMEA_0183 and the APM code:https://github.com/diydrones/ardupilot/blob/master/libraries/AP_GPS/AP_GPS_NMEA.cpp.

If you are planning to use other kinds of external GPS's, you have to shut the GPS connected internally the APM: https://code.google.com/p/arducopter/wiki/GPSDisable.

The APM (ArduCopter v3.0.1) needs the following packets to work: RMC,GGA,VTG, which are defined as GPS_SENTENCE_GPRMC, GPS_SENTENCE_GPGGA and GPS_SENTENCE_GPVTG packets in the firmware respectively. Writing directly to this ones I think it's what has to be done.

@tonybaltovski If you are able to do this convertion maybe then you can also write a plug-in to mavros to get those conversions :D (only useful for APM users) PX4 doesn't support NMEA devices.

@TSC21
Copy link
Member Author

TSC21 commented Aug 11, 2014

This can be easily implemented. Follow the vision_position.cpp plugin code in mavros main master branch. You can do almost a copy paste from it i just recommend that you add a parameter to choose if we are receiving a tf or pose from a vicon bridge or a optitrack bridge, so it can be more general.

@vooon
Copy link
Member

vooon commented Aug 15, 2014

Plugin added, testing required.

@TSC21
Copy link
Member Author

TSC21 commented Aug 15, 2014

See #122.

@mhkabir
Copy link
Member

mhkabir commented Jan 29, 2015

Plugin works fine, can see data in PX4 side. No support for it in INAV though.

For users, please use vision_position plugin for now. It will give you the same functionality.

@mhkabir mhkabir closed this as completed Jan 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants