PX4 / PX4-Devguide

PX4 Devguide GitBook
http://dev.px4.io
Other
195 stars 481 forks source link

Gazebo Simulation - instructions on starting gazebo separately don't work #454

Open hamishwillee opened 6 years ago

hamishwillee commented 6 years ago

Bug Page: Gazebo Simulation > Starting Gazebo and PX4 Separately doesn't work.

Anecdotally described in https://github.com/PX4/sitl_gazebo/issues/113 along with a solution.

Need to determine how that fails and whether the suggested solution is an adequate replacement. If it does fail, need to explain "how" it doesn't work.

hamishwillee commented 6 years ago

Questions:

  1. Can Gazebo work in VM. I've had it working in past, but now it always crashes, making testing difficult.
  2. https://dev.px4.io/en/simulation/gazebo.html#start_px4_sim_separately suggests you use make posix_sitl_default gazebo_none_ide but gazebo_none_ide does not exist. Is gazebo___ide the same thing?
  3. That doc also says "IDE select px4_ target you want to debug (e.g. px4_iris)". Are there instructions to import a project into an IDE such that you can see these targets? I s there a project file for QtCreator?
  4. HOw does make posix_sitl_default gazebo no_sim=1 differ from using an ide target - ie make posix_sitl_default gazebo___ide? If you use the no_sim option can you still debug? (edited)
hamishwillee commented 6 years ago

@TSC21 Any advice on this one?

dagar commented 6 years ago

Maybe we should start with the basics and build up?

How would you start gazebo manually without multiple layers of scripting?

hamishwillee commented 6 years ago

@dagar The linked doc suggests

cd workspace/Firmware
export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:build/posix_sitl_default/build_gazebo
gazebo Tools/sitl_gazebo/worlds/iris.world --verbose

How are the GAZEBO_MODEL_PATH and GAZEBO_PLUGIN_PATH related? Ie why are the solutions different?

Then in separate window run:

make posix_sitl_default gazebo no_sim=1

I'm very happy to have whatever is correct here as a solution - and agree starting with basics makes sense. But would also like to get the IDE thing working. So perhaps that is a separate topic.

hamishwillee commented 6 years ago

@EliaTarasov, can you comment on https://github.com/PX4/Devguide/issues/454#issuecomment-363729886 above (related to https://github.com/PX4/sitl_gazebo/issues/113 )