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

Connexion via serial 4/5 , optical flow implementation , GPS fake ? #281

Closed
Royalcheese opened this issue Apr 23, 2015 · 9 comments
Closed
Labels

Comments

@Royalcheese
Copy link

Hi everyone!
i'm a new user of px4 and mavros since one week. I'm trying to make it works via vicon in order to implement a new optical flow controller. But i've some basics issues which keep me from going deeper :(
i'm a bit confused with some points, if someone could help me <3

1/ i've installed mavros and px4 as described in tutorial, but when i'm running Roscore and $roslaunch mavros px4.launch fcu_url:=/dev/ttyUSB0:57600 , it just receive 0 packet and appears not to be connected.
Same result with the default $roslaunch mavros px4.launch , i can recover some data like data_raw or mag, but the /diagnotic say that :
level: 0
name: mavros: FCU connection
message: connected
hardware_id: /dev/ttyACM0:57600
values:
-
key: Received packets:
value: 0
-
key: Dropped packets:
value: 0
-
key: Buffer overruns:
value: 0

So do i have to assume that the bridge does not work properly ? my mavros appears to be the only publisher and subscriber on the stream (thanks to rostopic info tool ) , mavlink does work properly (i know it through cutecom device ) but i cannot makes them communicate together using ACM0 and serial 4/5 port (related to USB0 ).
I maybe does not understood something..

2/ About Vicon and optical flow, i've seen that some things have been implemented. I can recover a local position with optitrack node on ROS (x,y,z,r,p,y) , and i want to publish and override data on mavros local_pos topic, in order to make mavlink using my local_pos_ned for the autopilot.
I would use "ros topic tool relay" but i'm not sure if this is the best way, or if the implemented features are already doing the same thing. i may modify local_pos topic on mavros too, but i would like to know if other ways have already been implemented that i've missed.

3/ About the GPS , if i chose "GPS : no " and "GPS fake no ", will the autopilot start properly or does it need to work with GPS fake ?

here i am, i'm sorry to bother you with basics questions , if anyone could help , or redirecting me on appropriated topics, i would be extremely grateful =)

thanks in advances, have a good day all !

@vooon vooon added the question label Apr 23, 2015
@vooon
Copy link
Member

vooon commented Apr 23, 2015

  1. it's a bug link diagnostics don't shows mavlink_state_t (all fields are 0) #269, see rx/tx rates (second part of link report) and heartbeat diag (connection status based on heartbeat).
  2. If you override position from mavros you don't send it to FCU => FCU does not use your data. See extras plugins for that. Also it require some setup on FCU side, google it on px4 lists.
  3. Also google px4 lists (or ask if there no answer).

@Royalcheese
Copy link
Author

Ok thank you i'm on it ! :)
For 2, in fact i was looking to fake the actual local_position of mavros in order to avoid to many change in the program , cause i was expecting that he was already sending local_pos to mavlink, which use it in case of GPS fake, but i maybe got wrong.
i keep giving feedback on this .

@vooon
Copy link
Member

vooon commented Apr 23, 2015

2: FCU sends LOCAL_POSITION_NED -> MR local_position translate and publish message.

@Royalcheese
Copy link
Author

Thank you @vooon :) Just a question, as ROSTOPIC INFO is not reliable, do the "setpoint_position/local" is a published topic from mavros to mavlink as i expect ?

1/ Mavros and Mavlink can reach topic one each other but dont know when they are doing it, so that i can recover mavlink data for instance and mavros dont know who is the publisher with rostopic info.
So it seems not to be a problem at all finally.
2/ keep working on it.
3/ the drone seems to boot properly in "GPS no GPS_fake yes ". But I have to check .

@vooon
Copy link
Member

vooon commented Apr 24, 2015

Read plugin documentation on ros wiki.
Data flow is fixed: fcu sends -> publisher, fcu listen -> subscriber.

Setpoint position is desired position that fcu will try to achieve. That uses FCU internal position estimator.

@Royalcheese
Copy link
Author

Ok i was confused ^^ Thank you @vooon !

@Royalcheese
Copy link
Author

In order to link px4 frame and mocap frame I remaped Local_vision pose and mocap/pose, it works with x,y but not with Z, I don't know why.. I 'll try to set different weight for z_vision in order to see if that comes from the inav filter ..

@Royalcheese
Copy link
Author

just link the question to px4 user forum just in case: https://groups.google.com/forum/#!topic/px4users/yEBu74WEpqo

@Royalcheese
Copy link
Author

fixed with correcting z_vision weight

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

No branches or pull requests

2 participants