ROS + gazebo + PX4 SITL install and configuration
Hi, I'm trying to put a simulation together using ROS (currently Kinetic), Gazebo and PX4 SITL. At the moment I'm going round in circles a bit, and I've tried a few different approaches:
- PX4 + Gazebo (via Github PX4/Firmware repository). I can get a quadcopter up and running via PX4. I have run a few tutorials, and I have offboard control running via mavlink. But I can't get ROS to run - certainly the ROS launch files don't run under roslaunch - it claims that the px4 package doesn't exist. Abit or googling and reading around tells me that the reason is that I need to start gazebo out of ros to get a ros interface working.
- ROS (Kinetic) running rosgazebo. Again, I can get this up and running, and use
roslaunch
to get my world up and running in gazebo. But it looks like I don't have an instance of the PX4 mavros autopilot running - none of the mavros command line tools work (mavsafety
,mavcmd
etc), androstopi
c show me that the only publisher or subscriber to the mavros channels (e.g. /mavros/globalposition/global) is mavros. - Going back to PIX4 and ggogling further and I read that a ROS Kinetic interface is not supported by Gazebo, and I need to roll back to ROS Indigo. But ROS Indigo is not supported on Ubuntu 16.04 (Xenial) .. so I would need to install an earlier Ubuntu via docker...
at the moment my code structure is roughly as follows:
/opt/ros/kinetc
-> ROS Kinetic installation/home/steve/src/Firmware
-> clone of PX4/Firmware from Github. enables me to run a model viamake posix gazebo
/home/steve/src/uav_inspection_ws
-> my catkin workspace, with my own packages (e.g. offboard control for PX4 tutorial, etc))
Before I go any further down a rabbit-hole, I'm wondering whether anyone can set me on the right path.
Many thanks
Steve
Asked by steve_gh on 2018-03-09 16:47:30 UTC
Answers
I found a solution for No. 1 in the above:
- Make
px4
folder in~/catkin_ws/src
. - Copy
launch
folder of your px4 project folder such as~/PX4-Autopilot
orFirmware
, to~/catkin_ws/src/px4
. - The px4 ROS wrapper works well.
Asked by bigbellmercy on 2021-03-25 04:16:27 UTC
Comments
Hey Steve!
I'm trying to implement a similar application as you, have you had any success in putting these parts together? :) Regarding to your third item: I read from the gazebo documentation that it supports ROS Kinetic interface. (http://gazebosim.org/tutorials?tut=ros_installing)
Asked by Aave on 2019-01-09 02:33:30 UTC