ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

ROS + gazebo + PX4 SITL install and configuration

asked 2018-03-09 15:47:30 -0600

steve_gh gravatar image

updated 2022-01-31 08:45:27 -0600

lucasw gravatar image

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:

  1. 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.
  2. ROS (Kinetic) running ros_gazebo. 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, mavcmdetc), and rostopic show me that the only publisher or subscriber to the mavros channels (e.g. /mavros/global_position/global) is mavros.
  3. 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 via make 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

edit retag flag offensive close merge delete

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=ro... )

Aave gravatar image Aave  ( 2019-01-09 01:33:30 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-03-25 04:16:27 -0600

bigbellmercy gravatar image

I found a solution for No. 1 in the above:

  1. Make px4 folder in ~/catkin_ws/src.
  2. Copy launch folder of your px4 project folder such as ~/PX4-Autopilot or Firmware, to ~/catkin_ws/src/px4.
  3. The px4 ROS wrapper works well.
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-03-09 15:47:30 -0600

Seen: 4,001 times

Last updated: Mar 25 '21