Closed mhl787156 closed 3 years ago
@rob-clarke Any chance you might be able to have a look at this bug? I am absolutely stumped as to what might be happening. Essentially when running multiple mavros instances, when a command is sent, both the ros12 bridges die at the same time. I have a feeling this might be something to do with running multiple ros1/2_bridges at the same time and how its probably not designed for that. Up for any ideas you might have!
docker-compose -f docker-compose-multiple.yaml up
3000/load-trajectories
On further thought, if it is the case of difficulties caused by having two ros bridges running on the same system, I suppose we have the following options:
Sorry stray thought, I think the TF_REPEATED_DATA
may be due to the bridge re-publishing any TFs that come in between ros1 and ros2. If \tf
is treated just like any other topic then it will be republished. However since both ros1 and ros2 use the same transform library tf2
there may be a weird cross error where transforms get double published.
Evidence in also the fact that if mavros/local_position/tf/send
set to true (i.e. broadcasts its own tf) there are no warning messages coming up.
May need to add some notion of white-listing, may also help with the above error.
The bug in which running a trajectory with multiple mavros containers causes both ros1 bridges to die has been fixed. The ROS1 bridge now uses the parameter bridge
instead of the dynamic bridge
. The parameter bridge requires that a yaml file specify the list of topics and services in which that bridge operates.
The latest commits make the following changes:
mavros_config.yaml
based on VEHICLE_NAMESPACE
, a new configuration bridge_config.yaml
specifies the mavros topics which we should pass through. On runtime, the bridge_config.yaml
is rewritten to include the VEHICLE_NAMESPACE
in the topic names. --ros_args -r __ns:=<new ns>
) are misinterpreted by the parameter bridge
which expects the arguments to be the names of the parameter titles within the config yaml. Therefore we must provide these arguments for the namespace remapping to be successful. \tf
is not included in the bridge_config.yaml
which has now removed the re-publishing warnings! Therefore stderr is no longer piped into /dev/null
in run_ros1.sh
I think that covers the core issues and this PR should be ready to merge
Please add some docs
This PR was primarily to provide a method of using docker-compose to fly multiple drones. In implementing this, the following issues and bugs had to be fixed:
mavros_setup.sh
now changes the contents of a localmavros_config.yaml
and passes these tomavros
.MAVROS_TGT_SYSTEM
causes theFCU_PORT
to be set incorrectly to the default of zero. When calculating the port, theINSTANCE
is only dervied from an ordinalHOSTNAME
. Now ifMAVROS_TGT_SYSTEM
is set, theINSTANCE
is set toMAVROS_TGT_SYSTEM
- 1.TODO:
docker-compose-multiple.yaml