Hi, if I plug the telemetry into my computer, and open a mavros node to communicate with the FCU via the telemetry. What UDP address do I put when I launch mavros?
udp-b://@ as GCS URL.
launch fileor on the command line when your run it.
roslaunch mavros px4.launch fcu_url:="udp://:[email protected]:14557"
however the port and address are depends on your system.
thanks. I understand this, but when I plug in the telemetry onto my computer, what IP address do I use. Where can I find the IP address of the FCU? I am using rc telemetry for transmission
@zhahaoyu You could check your PC IP address using
mavroshave already received
mavlinkmessage from FCU(PX4) through telemetry port and transferred them to ROS message. You just let the
mavrosdo another thing, to publish the same information into the UDP port, where QGC could receive the information.
<FCU> ---telemtry port --<MAVROS>
<MAVROS> --- UDP ----<QGC> <MAVROS> ----ros message---<Other Nodets>
Thanks @weiweikong. Now I understand the structure. I tried to use the
roslaunch mavros px4.launch, and I am able to start a Mavros node communicating with FCU via telem, but how do I open a UDP port for QGC, and instruct QGC to listen to it?
When I start Mavros, everything was fine. But if I open QGC, then it automatically listens to the same telem port, and mavros crashes. So how can I create the connection between QGC and mavros
<include file="$(find mavros)/launch/node.launch"> <arg name="blacklist_yaml" value="$(find mavros)/launch/px4_blacklist.yaml" /> <arg name="config_yaml" value="$(find mavros)/launch/px4_config.yaml" /> <arg name="fcu_url" value="$(arg fcu_url)" /> <arg name="gcs_url" value="$(arg gcs_url)" /> <arg name="tgt_system" value="$(arg tgt_system)" /> <arg name="tgt_component" value="$(arg tgt_component)" /> </include>
gcs_url section is for the UDP configuration. The old px4 website has more detail https://pixhawk.org/peripherals/onboard_computers/intel_edison.
As the example shows
<arg name="gcs_url" default="udp://:[email protected]:14550" />
means QGC will then be connected via UDP to port 14556.
I followed your instruction, here is the launch file I used
<launch> <!-- vim: set ft=xml noet : --> <!-- example launch script for PX4 based FCU's --> <arg name="fcu_url" default="/dev/ttyUSB0:57600" /> <arg name="gcs_url" default="udp://:[email protected]:14550" /> <arg name="tgt_system" default="1" /> <arg name="tgt_component" default="1" /> <arg name="log_output" default="screen" /> <include file="$(find mavros)/launch/node.launch"> <arg name="pluginlists_yaml" value="$(find mavros)/launch/px4_pluginlists.yaml" /> <arg name="config_yaml" value="$(find mavros)/launch/px4_config.yaml" /> <arg name="fcu_url" value="$(arg fcu_url)" /> <arg name="gcs_url" value="$(arg gcs_url)" /> <arg name="tgt_system" value="$(arg tgt_system)" /> <arg name="tgt_component" value="$(arg tgt_component)" /> <arg name="log_output" value="$(arg log_output)" /> </include> </launch>
and mavros still crashes with following error message when I start QGC
ERROR] [1478057788.915106802]: serial0: receive: End of file terminate called after throwing an instance of 'std::system_error' what(): Resource deadlock avoided ================================================================================REQUIRED process [mavros-2] has died! process has died [pid 12427, exit code -6, cmd /opt/ros/kinetic/lib/mavros/mavros_node __name:=mavros __log:=/home/haoyu/.ros/log/849342f6-a0ad-11e6-8d09-000f6005d13e/mavros-2.log]. log file: /home/haoyu/.ros/log/849342f6-a0ad-11e6-8d09-000f6005d13e/mavros-2*.log Initiating shutdown! ================================================================================ [mavros-2] killing on exit [rosout-1] killing on exit [master] killing on exit shutting down processing monitor... ... shutting down processing monitor complete done
@zhahaoyu I am not quite sure about this situation. In my experience, QGC should work independently with ROS, so it should be start-up normally, and we could set QGC UDP configuration to listen to the information from
serial0: receive: End of file
I am now sure whether above information means QGC tried to connect FCU with serial port. If it was true, QGC or
mavros might crashed.
I believe QGC is trying to use the serial port. When I use QGC with ROS in SITL mode, everything works fine. I just don't know how to do this with real pixhawk fcu.
@zhahaoyu Maybe try to start QGC first then configure it using UDP connection instead of serial port before you launching the mavros wih PX4.
@weiweikong Thanks so much. I solved the problem. For others' reference, here is what I did:
roslaunch mavros px4.launch
Now a chain
FCU <---telemetry---> MAVROS <---UDP---> QGCis established. QGC will not automatically connect with the FCU vai Telemetry anymore. If we still want that, we could configure a manual connection.
udp-b://@ as GCS URL.
Hi, I have a similar problem, I got an FPV Radio Telemetry Ground Module and I want it to communicate with the telemetry that owns the Iris drone.
When I connect the telemetry (Ground) to my ubuntu pc and turn on the drone does not start the Qground station.
Why is this problem?
Do I have to install any drivers?