mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
904 stars 993 forks source link

Add parameters for frame_id of static transforms for multi-vehicle systems #1967

Closed EnderMandS closed 4 months ago

EnderMandS commented 4 months ago

Similar to another PR at branch-ros2, this PR solves the problem of static transforms namespace conflicts in multi-vehicle systems by adding parameters. Also dealt with a similar issue with the lookup_static_transform function in the odometry plugin.

Users can modify the frame_id by adding the following parameter to the launch file :

<param name="base_link_frame_id" value="$(arg base_link_frame_id)" />
<param name="odom_frame_id" value="$(arg odom_frame_id)" />
<param name="map_frame_id" value="$(arg map_frame_id)" />

While changing the launch file also change the corresponding frame_id section in the px4_config.yaml file :

# odom example
odometry:
  fcu:  # change frame_id to vehicle_0/...
    map_id_des: "vehicle_0/map"    # desired parent frame rotation of the FCU's odometry
    odom_child_id_des: "vehicle_0/base_link"    # desired child frame rotation of the FCU's odometry
    odom_parent_id_des: "vehicle_0/odom"