Nvidia Jetson Xavier AGX controlling PX4/Pixhawk (ROS, MAVROS)

@jamesthesken I was able to solve the issue of the simulator not connecting through the following.

I had the same issue where launching PX4 SITL gave me the info message:

INFO [simulator] Waiting for simulator to accept connection on TCP port 4560

I changed this so that the simulator would connect by changing it to connect on UDP port 14560.

This works on the latest master branch (commit Dec 14 13:04:01). I tried testing the latest stable release for some reason did not work.

in /build/px4_sitl_default/etc/init.d-posix/rcS after line 107 add the following:
simulator_udp_port = $((14560+px4_instance))

and change line 213 to:
simulator start -u $simulator_udp_port

in /Tools/sitl_gazebo/models/iris/iris.sdf (or whichever PX4 model you are working with )change line 506 to
<use_tcp>0</use_tcp>

The simulator now connects and I am able to do commands such as commander takeoff and use mavros in OFFBOARD mode.

I am using an Nvidia Jetson AGX Xavier. Good luck!