MAVROS Tutorial

Hello Everyone.
I’m new in ROS. Basically I’m looking for a tutorial to run mavros.
I am using a Jetson TX2 and I have already installed ROS and MAVROS.
I have the pixhawk 4 connected to Jetson via Telem port 2.
I want to know step by step how to control the drone with MAVROS for instance: go up, down, left, right, go ahead and back.
I don’t want to use the gazebo, I want to run a test in my own drone I have.
Please, I ask for help to the community.

1 Like

I am looking for something similar. @subarashi have you found good resources in the meantime?

I really suggest you try it first with the simulator just to be safe especially if you want to try your own algorithm. You can try HITL mode if you want it to run with the real PX4 in Gazebo. But if you really want to try it without simulation, just try the offboard mode example in mavros tutorial

Hi there!
Please check my github:
Pixhawk and Jetson TX2

I am waiting for new motors so after 1 month perhaps I will submit another file into my Github.

Absolutely! Simulation should always go first. Thanks for the replies!
@subarashi: thank you, I will check it out =)

Simulations is good but in my case it’s getting difficult to do it, that is why I am running directly in the drone. 'cause running in gazebo is being difficult… I can’t find a tutorial to do it.

the tutorial is pretty simple to use the gazebo mode. But a little bit complex if you want to put px4/sitl_gazebo inside one workspace

cause it’s not only using the gazebo… My algorithm is in the TX2 so there is communication between them… that’s why is a little bit complicated for my case… The TX2 is sending commands to the PX4 and PX4 is sending data to the TX2… So this project is a bit difficult to implement in Gazebo, don’t you think so?

my project use Jetson Nano with mavros handle the communication/command between them. So far I’m working on the algorithm in gazebo such as arming, hold position, takeoff landing, following trajectory etc from gazebo. Are you trying to use mavsdk or direct mavlink communication bewteen them or using mavros?

I’m using mavros and until now is working well, cause TX2 send the commands “Go up, Go down, hold position and Takeoff” and “Trackin using DNN in TX2”. I’d like to run my project in gazebo to show in my laboratory presentation but still can’t connect the PX4, TX2 into gazebo… Any suggestions?

You should read the HITL Mode or simulation devguide