How to split a launch file for two different nodes?
I am new to ROS, please bear with me.
I am trying to run a PX4 drone avoidance module, with a PX4 drone simulator, on two different computers. (intel x86, and jetson tx2). Both have ROS melodic installed.
All the instructions on how to do so on a _single computer_ are here. From what I understand, first you build the avoidance module, build the simulator, then update the ROS_PACKAGE_PATH and GAZEBO_MODEL_PATH, so that the launch files can locate simulator. And the module is launched using,
roslaunch local_planner local_planner_stereo.launch
This launch file, calls the another launch file, avoidance_sitl_stereo.launch, which calls avoidance_sitl_mavros.launch.
all three launch files
local_planner_stereo.launch
avoidance_sitl_stereo.launch
avoidance_sitl_mavros.launch
Within the launch files, PX4 refers to simulator.
My questions are,
- How do i split the launch file, so that PX4 runs on one system, and avoidance on the other? in local_planner_stereo.launch, should i just comment out the section launching PX4 and mavros, and have that run on different computer?
- Should then MAVROS be running on both systems?
- What other MAVROS parameters would need to be modified?