StarlingUAS / ProjectStarling

BRL Flight Arena Infrastructure 2.0
Other
16 stars 3 forks source link

ROS_HOSTNAME set to localhost for mavros running on a drone via kubernetes deployment #16

Closed mhl787156 closed 3 years ago

mhl787156 commented 3 years ago

This minor PR sets ROS_HOSTNAME and ROS_MASTER_URI in the kubernetes mavros arm64 deploy. When running hostNetwork:true the ROS_HOSTNAME defaults to the hostname of the machine (e.g. clover-4419) rather than the container or localhost. When mavros on ROS1 attempts to connect to master, it complains it cannot contact its own server at https://clover-4419:39347.

This is solved by explicitly setting ROS_HOSTNAME to localhost for ROS1. This is only necessary for running the container on a drone with hosNetwork enabled.