PX4-SITL_gazebo-classic icon indicating copy to clipboard operation
PX4-SITL_gazebo-classic copied to clipboard

Can we change mavlink tcp port to which gazebo connects ?

Open airsimdevdd opened this issue 1 year ago • 5 comments

I want gazebo to connect to different tcp port other than tcp 4560 ,px4 must open 4560 I want to intercept the msgs and redirect it to gazebo

airsimdevdd avatar Aug 01 '22 06:08 airsimdevdd

@airsimdevdd Yes, you can change the port by configuring the tcp port of the plugin: https://github.com/PX4/PX4-SITL_gazebo/blob/f71680afab60da2d72bcbddbed0b289cd0cd7814/models/iris/iris.sdf.jinja#L453

Jaeyoung-Lim avatar Aug 02 '22 09:08 Jaeyoung-Lim

@airsimdevdd Yes, you can change the port by configuring the tcp port of the plugin:

https://github.com/PX4/PX4-SITL_gazebo/blob/f71680afab60da2d72bcbddbed0b289cd0cd7814/models/iris/iris.sdf.jinja#L453

I am launching Gazebo with ros wrappers, I have already changed TCP port of the plugin yet everything remains the same.

airsimdevdd avatar Aug 03 '22 06:08 airsimdevdd

@airsimdevdd Have you checked if the sdf file generated have the tcp port changes you applied? If not you need to figure out what your ros wrapper is doing with the sdf generation

Jaeyoung-Lim avatar Aug 03 '22 06:08 Jaeyoung-Lim

@airsimdevdd Have you checked if the sdf file generated have the tcp port changes you applied? If not you need to figure out what your ros wrapper is doing with the sdf generation

Yes I have checked, sdf file does have the same tcp port. Any more suggestions...??

airsimdevdd avatar Aug 03 '22 06:08 airsimdevdd

@airsimdevdd Then it means your change did not get applied? It is not possible that nothing changes if the tcp port has changed in the sdf file and the simulation is using it. The plugin configures the port

Jaeyoung-Lim avatar Aug 03 '22 07:08 Jaeyoung-Lim

Closing as there was no response

Jaeyoung-Lim avatar Aug 24 '22 07:08 Jaeyoung-Lim