These are chat archives for PX4/PX4Devguide

16th
Jun 2016
Vinh K
@vinhk
Jun 16 2016 16:41
Has anyone able to use gazebo simulator to launch with Iris quadcopter?
Daniel Agar
@dagar
Jun 16 2016 17:34
I just tried it with master
Lorenz Meier
@LorenzMeier
Jun 16 2016 17:34
What’s the issue with it?
Vinh K
@vinhk
Jun 16 2016 18:10
when I run this command
make posix_sitl_default gazebo
I get these errors
[100%] Built target mainapp
SITL ARGS
rc_script: posix-configs/SITL/init/rcS
debugger: none
program: gazebo
model: none
build_path: /home/lab/src/Firmware/build_posix_sitl_default
empty model, setting iris as default
Tools/sitl_run.sh: line 47: jps: command not found
make[5]: warning: jobserver unavailable: using -j1. Add +' to parent make rule. make[8]: *** No rule to make target/home/lab/src/Firmware/Tools/sitl_gazebo/msgs/PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND', needed by `msgs/MotorSpeed.pb.cc'. Stop.
make[7]: [msgs/CMakeFiles/mav_msgs.dir/all] Error 2
make[7]:
Waiting for unfinished jobs....
[ 2%] Built target hello_world
make[6]: [all] Error 2
make[5]:
[gazebo_build] Error 2
make[4]: [src/firmware/posix/CMakeFiles/gazebo] Error 2
make3:
[src/firmware/posix/CMakeFiles/gazebo.dir/all] Error 2
make2: [src/firmware/posix/CMakeFiles/gazebo.dir/rule] Error 2
make1:
[gazebo] Error 2
make: * [posix_sitl_default] Error 2
Daniel Agar
@dagar
Jun 16 2016 18:11
PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND
Lorenz Meier
@LorenzMeier
Jun 16 2016 18:12
@vinhk You need to follow the install instructions
Vinh K
@vinhk
Jun 16 2016 18:14
@LorenzMeier Hi Lorenz
I believe i did everything correctly
Lorenz Meier
@LorenzMeier
Jun 16 2016 18:16
You don’t have the protobuf compiler installed
Vinh K
@vinhk
Jun 16 2016 18:16
@LorenzMeier okay, I'll install that now Lorenz
I have fininished intalling it
now I have similar results
[100%] Built target mainapp
SITL ARGS
rc_script: posix-configs/SITL/init/rcS
debugger: none
program: gazebo
model: none
build_path: /home/lab/src/Firmware/build_posix_sitl_default
empty model, setting iris as default
Tools/sitl_run.sh: line 47: jps: command not found
make[5]: warning: jobserver unavailable: using -j1. Add +' to parent make rule. make[8]: *** No rule to make target/home/lab/src/Firmware/Tools/sitl_gazebo/msgs/PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND', needed by `msgs/MotorSpeed.pb.cc'. Stop.
make[7]: [msgs/CMakeFiles/mav_msgs.dir/all] Error 2
make[7]:
Waiting for unfinished jobs....
[ 2%] Built target hello_world
make[6]: [all] Error 2
make[5]:
[gazebo_build] Error 2
make[4]: [src/firmware/posix/CMakeFiles/gazebo] Error 2
make3:
[src/firmware/posix/CMakeFiles/gazebo.dir/all] Error 2
make2: [src/firmware/posix/CMakeFiles/gazebo.dir/rule] Error 2
make1:
[gazebo] Error 2
make: * [posix_sitl_default] Error 2
Daniel Agar
@dagar
Jun 16 2016 18:21
how did you install gazebo?
for me the default instructions installed the protobuf package you're missing
Vinh K
@vinhk
Jun 16 2016 18:22
I have ROS indigo
@dagar Daniel
@dagar I uninstalll gazebo that came with the indigo bundle, then I did this

sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu lsb_release -cs main" > /etc/apt/sources.list.d/gazebo-latest.list'

wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -

sudo apt-get update

@dagar sudo apt-get install ros-$ROS_DISTRO-gazebo6-ros-pkgs
from this tutorial
Daniel Agar
@dagar
Jun 16 2016 18:37
What about this part?
sudo apt-get install gazebo6
sudo apt-get install libgazebo6-dev
Vinh K
@vinhk
Jun 16 2016 18:39
@dagar I have not done that one
let me try that
I ran the first command sudo apt-get install gazebo6
so far so good
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
second command
sudo apt-get install libgazebo6-dev
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
the command above I use
Daniel Agar
@dagar
Jun 16 2016 18:42
What about the simulation packages mentioned here? http://dev.px4.io/starting-installing-linux.html
Vinh K
@vinhk
Jun 16 2016 18:42
sudo apt-get install ros-$ROS_DISTRO-gazebo6-ros-pkgs
may have install the two installations
let me do that
Vinh K
@vinhk
Jun 16 2016 19:03
I am done with that tutorial
@dagar overall I can only do the basic simulator
Daniel Agar
@dagar
Jun 16 2016 19:05
Did you get the part under # simulation tools?
# simulation tools
sudo apt-get install ant protobuf-compiler libeigen3-dev libopencv-dev openjdk-7-jdk openjdk-7-jre clang-3.5 lldb-3.5 -y
Vinh K
@vinhk
Jun 16 2016 19:07
let me check
yes
Daniel Agar
@dagar
Jun 16 2016 19:09
can you run dpkg -l | grep protobuf?
Vinh K
@vinhk
Jun 16 2016 19:10
@dagar absolutely, let me do it now
ii libmirprotobuf-dev:amd64 0.1.8+14.04.20140411-0ubuntu1 amd64 Display server for Ubuntu - protocol definition
ii libmirprotobuf0:amd64 0.1.8+14.04.20140411-0ubuntu1 amd64 Display server for Ubuntu - protocol implementation
ii libprotobuf-dev:amd64 2.5.0-9ubuntu1 amd64 protocol buffers C++ library (development files)
ii libprotobuf-lite8:amd64 2.5.0-9ubuntu1 amd64 protocol buffers C++ library (lite version)
ii libprotobuf8:amd64 2.5.0-9ubuntu1 amd64 protocol buffers C++ library
ii protobuf-compiler 2.5.0-9ubuntu1 amd64 compiler for protocol buffer definition files
I am getting these
Daniel Agar
@dagar
Jun 16 2016 19:12
those are all the protobuf packages I have
can you try the simulation again?
Vinh K
@vinhk
Jun 16 2016 19:12
okay
Daniel Agar
@dagar
Jun 16 2016 19:12
make posix_sitl_default gazebo_iris
Vinh K
@vinhk
Jun 16 2016 19:13
No luck yet Daniel
lab@lab-OptiPlex-9020:~/src/Firmware$ make posix_sitl_default gazebo_iris
PX4 CONFIG: posix_sitl_default
[ 0%] [ 1%] [ 1%] [ 1%] Built target prebuild_targets
Built target git_gencpp
Built target git_genmsg
Built target git_mavlink
[ 1%] Built target git_uavcan
[ 4%] Built target df_driver_framework
[ 5%] Built target git_driverframework
[ 5%] Built target git_ecl
[ 5%] Built target git_gazebo
[ 5%] Built target mixer_gen
[ 5%] Built target git_jmavsim
[ 6%] Built target xml_gen
[ 31%] Built target msg_gen
[ 31%] Built target generate_topic_listener
[ 32%] Built target git_matrix
[ 32%] Built target platformscommon
[ 32%] Built target drivers
boardssitl
[ 35%] [ 35%] Built target drivers
device
Built target driversgps
[ 42%] Built target systemcmds
tests
[ 42%] Built target platformsposixdriversadcsim
[ 42%] Built target platforms
posixdriversaccelsim
[ 42%] Built target platformsposixdriversgyrosim
[ 42%] Built target platforms
posixdriversbarosim
[ 43%] Built target driverspwm_out_sim
[ 44%] Built target platforms
posixdriversairspeedsim
[ 45%] [ 45%] Built target platformsposixdriversledsim
Built target platforms
posixdriversgpssim
[ 46%] Built target platformsposixpx4_layer
[ 46%] Built target platformsposixdriversrgbledsim
[ 47%] Built target platforms
posixdriverstonealrmsim
[ 51%] Built target platformsposixwork_queue
[ 52%] Built target systemcmdsmixer
[ 52%] Built target systemcmds
esc_calib
[ 52%] Built target systemcmdsperf
[ 52%] Built target systemcmds
reboot
[ 53%] Built target systemcmdssd_bench
[ 54%] Built target systemcmds
topic_listener
[ 54%] [ 54%] Built target systemcmdsver
Built target systemcmds
top
[ 55%] Built target modulesattitude_estimator_q
[ 55%] Built target modules
attitude_estimator_ekf
[ 60%] Built target libecl
[ 60%] Built target systemcmds
param
[ 60%] Built target modulesekf2
[ 61%] [ 62%] Built target modules
ekf_att_pos_estimator
Built target libexternal_lgpl
[ 62%] Built target modules
load_mon
[ 63%] Built target modulesland_detector
[ 63%] Built target modules
mc_att_control
[ 65%] Built target modulesuORB
[ 65%] Built target modules
mc_pos_control
[ 66%] Built target modulesdataman
[ 68%] Built target modules
mc_att_control_multiplatform
[ 71%] Built target modulesmavlink
[ 74%] Built target modules
commander
[ 75%] Built target modulesmc_pos_control_multiplatform
[ 75%] Built target modules
param
[ 76%] Built target modulesposition_estimator_inav
[ 76%] [ 80%] Built target modules
sensors
Built target modulesnavigator
[ 81%] Built target modules
sdlog2
[ 84%] Built target moduleslocal_position_estimator
[ 85%] Built target modules
simulator
[ 87%] [ 88%] Built target modulessystemlibmixer
Built target libcontrollib
[ 92%] Built target modules
systemlib
[ 93%] Built target libDriverFrameworkframework
[ 93%] [ 93%] Built target libconversion
Built target lib
geo
[ 94%] Built target modulesvtol_att_control
[ 94%] Built target lib
geo_lookup
[ 95%] [ 95%] [ 96%] Built target libmathlib
Built target lib
launchdetection
Built target libmathlibmathfilter
[ 96%] [ 96%] [ 96%] Built target examples
px4_simple_app
Built target librunway_takeoff
Built target lib
tailsitter_recovery
[ 97%] Built target modulescommandercommander_tests
[ 97%] [ 97%] [ 98%] Built target modulescontrollib_test
Built target lib
terrain_estimation
Built target modulesuORBuORB_tests
[ 98%] Built target modulesunit_test
[ 98%] [ 98%] [ 99%] Built target modules
fw_att_control
Built target moduleslogger
Built target modules
fw_pos_control_l1
[100%] Built target mainapp
Scanning dependencies of target gazebo_iris
SITL ARGS
rc_script: posix-configs/SITL/init/rcS
debugger: none
program: gazebo
model: iris
build_path: /home/lab/src/Firmware/build_posix_sitl_default
make[5]: warning: jobserver unavailable: using -j1. Add +' to parent make rule. make[8]: *** No rule to make target/home/lab/src/Firmware/Tools/sitl_gazebo/msgs/PROTOBUF_PROTOC_EX
Daniel Agar
@dagar
Jun 16 2016 19:16
I'm not sure what's wrong with your environment
it's looking for the protobuf compiler (PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND)
Vinh K
@vinhk
Jun 16 2016 19:16
here is the rest of it Daniel
Daniel Agar
@dagar
Jun 16 2016 19:16
but according to dpkg you have it
Vinh K
@vinhk
Jun 16 2016 19:17
make[8]: No rule to make target /home/lab/src/Firmware/Tools/sitl_gazebo/msgs/PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND', needed bymsgs/MotorSpeed.pb.cc'. Stop.
make[7]:
[msgs/CMakeFiles/mav_msgs.dir/all] Error 2
make[7]: Waiting for unfinished jobs....
[ 2%] Built target hello_world
make[6]:
[all] Error 2
make[5]: [gazebo_build] Error 2
make[4]:
[src/firmware/posix/CMakeFiles/gazebo_iris] Error 2
make3: [src/firmware/posix/CMakeFiles/gazebo_iris.dir/all] Error 2
make2:
[src/firmware/posix/CMakeFiles/gazebo_iris.dir/rule] Error 2
make1: [gazebo_iris] Error 2
make:
[posix_sitl_default] Error 2
Daniel Agar
@dagar
Jun 16 2016 19:18
mine found PROTOBUF_PROTOC_EXECUTABLE:FILEPATH=/usr/bin/protoc
do you have /usr/bin/protoc?
Vinh K
@vinhk
Jun 16 2016 19:19
let me check
Daniel Agar
@dagar
Jun 16 2016 19:20
based on dpkg I'm pretty sure you do
Vinh K
@vinhk
Jun 16 2016 19:20
yes I have /usr/bin/protoc
Daniel Agar
@dagar
Jun 16 2016 19:20
have you made any changes to the firmware you need to save?
Vinh K
@vinhk
Jun 16 2016 19:21
do I need to connect to a FC?
the firmware I got from the link git
Daniel Agar
@dagar
Jun 16 2016 19:21
have you modified any code in firmware?
sounds like no
can you try make distclean and then make posix_sitl_default gazebo_iris
Vinh K
@vinhk
Jun 16 2016 19:22
okay
so far I got something
Screenshot from 2016-06-16 15:25:26.png
but there is no Iris quadcopter
Vinh K
@vinhk
Jun 16 2016 19:27
in the gazebo
Vinh K
@vinhk
Jun 16 2016 19:41
I have some of these errors
Daniel Agar
@dagar
Jun 16 2016 19:47
sorry I'm not sure from here
I would guess those "unable to connect to model database using..." errors are your issue, but I don't know much about gazebo
Vinh K
@vinhk
Jun 16 2016 19:54
lol
okay well thank you Daniel
At least you help me this far
thanks