mavros icon indicating copy to clipboard operation
mavros copied to clipboard

Run MAVROS without SITL

Open ChinmayDSastry opened this issue 4 years ago • 16 comments

How to run mavros without sitl. I just want to use mavros with gazebo without it connecting to fcu. I have my own robot and I want to command it by using mavros.

Thanks

ChinmayDSastry avatar Feb 24 '21 20:02 ChinmayDSastry

Hi, I have the same problem, did you find any solutions?

Scarf195 avatar Mar 03 '21 16:03 Scarf195

gazebo is a virtual replacement of your robot. You can either connect it to gazebo or real robot. @spellftw do you have any kind of FCU on your robot?

dimaxano avatar Mar 03 '21 16:03 dimaxano

@dimaxano, Hi I am pretty new to this topic, my robot is a ship with 2 thrusters. I want to control it using ArduPilot in gazebo without using SITL. Is that possible? I want to check whether we can trick the arduPilot in reading "fake" GPS and IMU values otherwise it will give readings as 0. Thanks

ChinmayDSastry avatar Mar 03 '21 17:03 ChinmayDSastry

Hi! If you want to control the robot in real life you need to put hardware FCU on your ship and connect your trusters to it. Gazebo is not used here. If you have a model of your ship (or similar one) in gazebo you may run Ardupilot SITL and connect it to gazebo (instruction). Then you will be able to control simulated ship Tell me if something is still no clear

dimaxano avatar Mar 04 '21 08:03 dimaxano

Hi, So to make everything clear:

  1. If I have a ship model with me I need to convert it accordingly to ardupilot model file. 2)This is the only way to communicate with MAVROS, without SITL it is not possible? If I want to simulate my ship with ardupilot in gazebo I will have to use SITL, I can't by pass it?

Thanks a Lot!

ChinmayDSastry avatar Mar 04 '21 09:03 ChinmayDSastry

@spellftw but are you using any FCU hardware? I also have my own ship delevoped in ROS and I would only to send gps data to QGroundControl through mavros. Do you know if this is possible?

Scarf195 avatar Mar 04 '21 09:03 Scarf195

@Scarf195 , I have Navio2. But I am trying to do the same thing as you. I also would like to know if it is possible. Are you also trying to run a mavros node without connecting to FCU Url. So that you can control your ship through mavros without using SITL?

ChinmayDSastry avatar Mar 04 '21 09:03 ChinmayDSastry

I could not understand what you are trying to achieve. Mavros is a bridge between Flight Control software (a firmware) which runs somewhere, on a Flight Control Unit, such as Pixhawk autopilot, or on some computer in virtual environments.

Software in Loop or Hardware in Loop not matters. You're talking to control software that's it.

vooon avatar Mar 04 '21 09:03 vooon

I am trying to develop a pilot for my ship which can command its thrusters. The pilot is a ros node which should connect to ardupilot controller. Trying to establish a communication between Gazebo and ArduPilot to deliver commands to the ArduPilot via the pilot node.

ChinmayDSastry avatar Mar 04 '21 10:03 ChinmayDSastry

Then you first need to connect all the hardware, like thrusters ESC's, RC receiver (at least to have kill-switch) etc, to the FCU which runs Ardupilot (i suppose that you need ArduRover variant for boat).

Then make a connection from APM to Mavros by setting suitable fcu_url. At that stage your node would be able to use mavros topics to control APM.

Then use whatever software you want to control your node.

vooon avatar Mar 04 '21 11:03 vooon

@vooon so MAVROS is a bridge for FCU-ROS but not for ROS-GCS right? I need to send GPS data from my vehicle (fully controlled by ROS running on board) to a ground control station (like QGC). Do you have any suggestions? Thank you very much for your help.

Scarf195 avatar Mar 04 '21 14:03 Scarf195

@Scarf195 yes, i only have plans to make possible to write GCS-plugins for ROS2. For mavros 1 it's unlikely to make any new big changes. My suggestion - use pymavlink to write prototype node which would implement some minimal set of autopilot messages (see PX4 and APM code for examples). Then if you have issues with performance, you could use libmavconn to write C++ node.

vooon avatar Mar 04 '21 14:03 vooon

@vooon Thanks a lot for your patience and your help.

ChinmayDSastry avatar Mar 04 '21 14:03 ChinmayDSastry

Probably confusion here caused by GCS proxy feature, which simply forwards FCU messages to GCS.

For @Scarf195 's objective, he needs to act as FCU, so GCS could talk to it.

For @spellftw - connect existing APM firmware to mavros, then use it to control FC. And it's possible to use MissionPlanner trough proxy. For Gazebo i suppose you have to write custom node. But i do not know how, i only use it as a simulation environment.

vooon avatar Mar 04 '21 14:03 vooon

@vooon thank you very much for your suggestion, I got confused with GCS proxy feature, sorry. I'm new in this topic, which codes are you referring to? Do you have any examples? Thank you for your patience

Scarf195 avatar Mar 08 '21 16:03 Scarf195

@Scarf195 Have you made any progress with sending GPS data to a ground control station?

natetoombs avatar Jun 21 '21 19:06 natetoombs