I’m trying to setup a px4 within a mocap system. The peculiarities of the system are the following:
-
I have an Auterion system that is composed of a companion computer and a PX4 autopilot.
-
I use a WiFi-router to connect all the systems: The Mocap server (192.168.0.10), a Linux system with GCS and ROS (192.168.0.15) that redirects/remaps the ROS messages and the Auterion (192.168.0.11) that should receive the topics. I have changed the configuration files of the Auterion (with mavlink-router library) in order to send Mavlink to the GCS inside Linux automatically.
I have been following the steps in external_position_estimation
It seems that it works up to Linux sending the Mavros topic from the ROS system, because I can see it with the command rostopic echo /mavros/vision_pose/pose
, but PX4 does not seem to receive it.
I’m not sure about the fcu_url
and gcs_url
and the upd/tcp ports in the launch script of Mavros. The thing I’ve come up to is the following modified ROS launch script (based on px4.launch):
<launch>
<arg name="fcu_url" default="udp://:14553@192.168.0.11:14556" />
<arg name="gcs_url" default="udp://192.168.0.15:14550@192.168.0.15:14560" />
<arg name="tgt_system" default="1" />
<arg name="tgt_component" default="1" />
<arg name="server" default="192.168.0.10"/>
<arg name="log_output" default="screen" />
<arg name="fcu_protocol" default="v2.0" />
<arg name="respawn_mavros" default="false" />
<node pkg="mavros" type="mavros_node" name="mavros" required="$(eval not respawn_mavros)" clear_params="true" output="$(arg log_output)" respawn="$(arg respawn_mavros)">
<param name="fcu_url" value="$(arg fcu_url)" />
<param name="gcs_url" value="$(arg gcs_url)" />
<param name="target_system_id" value="$(arg tgt_system)" />
<param name="target_component_id" value="$(arg tgt_component)" />
<param name="fcu_protocol" value="$(arg fcu_protocol)" />
</node>
<node pkg="vrpn_client_ros" type="vrpn_client_node" name="vrpn_client_node" output="screen">
<remap from="/vrpn_client_node/drone/pose" to="/mavros/vision_pose/pose"/>
<rosparam subst_value="true">
server: $(arg server)
port: 3883
update_frequency: 100.0
frame_id: world
# Use the VRPN server's time, or the client's ROS time.
use_server_time: false
broadcast_tf: true
# Must either specify refresh frequency > 0.0, or a list of trackers to create
refresh_tracker_frequency: 1.0
#trackers:
#- FirstTracker
#- SecondTracker
</rosparam>
</node>
</launch>
Is it correct? At least I don’t receive any errors when executing it.
I used the tip of the previous page and when changing MAV_ODOM_LP parameter to 1, I stop receiving any ODOMETRY message.
Is there other way to debug the communication?