PX4-Autopilot: Gazebo camera plugin fails on Ubuntu 16.04
Been like this for me of over a week or so. Running from latest master:
make distclean
make posix gazebo_typhoon_h480
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 10.0.0.35
[Wrn] [msgs.cc:1852] Conversion of sensor type[sonar] not supported.
[Err] [Plugin.hh:180] Failed to load plugin libgazebo_gst_camera_plugin.so: libgazebo_gst_camera_plugin.so: cannot open shared object file: No such file or directory
[Msg] Camera on udp port 14530
[Wrn] [gazebo_sonar_plugin.cpp:84] [gazebo_sonar_plugin] Please specify a robotNamespace.
[Dbg] [gazebo_mavlink_interface.cpp:132] joint [rotor_4_joint] found for channel[0] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:132] joint [rotor_5_joint] found for channel[1] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:132] joint [rotor_2_joint] found for channel[2] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:132] joint [rotor_3_joint] found for channel[3] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:132] joint [rotor_0_joint] found for channel[4] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:132] joint [rotor_1_joint] found for channel[5] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:132] joint [typhoon_h480::cgo3_camera_joint] found for channel[6] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:132] joint [typhoon_h480::cgo3_camera_joint] found for channel[7] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:132] joint [typhoon_h480::cgo3_vertical_arm_joint] found for channel[8] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:132] joint [left_leg_joint] found for channel[9] joint control active for this channel.
[Dbg] [gazebo_mavlink_interface.cpp:132] joint [right_leg_joint] found for channel[10] joint control active for this channel.
10.10
[Msg] Using MAVLink protocol v2.0
[Msg] GimbalControllerPlugin::Init
[Err] [Publisher.cc:96] EXCEPTION: Invalid message type
terminate called after throwing an instance of 'gazebo::common::Exception'
SITL COMMAND: /home/parallels/repos/Firmware/build/posix_sitl_default/bin/px4 /home/parallels/repos/Firmware/ROMFS/px4fmu_common -s etc/init.d-posix/rcS -t /home/parallels/repos/Firmware/test_data
INFO [Unknown] Creating symlink /home/parallels/repos/Firmware/ROMFS/px4fmu_common -> /home/parallels/repos/Firmware/build/posix_sitl_default/tmp/rootfs/etc
67 WARNING: setRealtimeSched failed (not run as root?)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (17 by maintainers)
@bozkurthan exactly, this is how I got it to work. @hamishwillee Here is what I meant by
sudo
: The error in the code above is caused by the fact thatlibgazebo_gst_camera_plugin.so
gazebo model or its px4 mixers are missing. This can be caused by one of the following reasons:The entire model located at
Firmware/tools/sitl_gazebo/models/typhoon_h480/
is missing or is not added to$GAZEBO_MODELS_PATH
and$GAZEBO_PLUGIN_PATH
. The solution is to make sure you have them under the specified directory and addexport GAZEBO_...
commands to your~/.bashrc
to make sure nothing override them.A symlink between your built folder directory
/Firmware/build/posix_sitl_default/tmp/rootfs/etc
and the directory containing the model’s mixers located at/Firmware/ROMFS/px4fmu_common/init.d-posix/6011_typhoon_h480
was not created due to the lack ofsudo
privileges, which was indicated by the shared error message below. A simple fix is to create those links only once usingsudo
and then the warning message can be neglected and won’t result in your code termination. Another solution is obviously to create that link manually.Side note: most of the installation instruction for px4 assumes that you are the
sudo
user, for example, you would see something like “install the pacakge:apt-get install blablabla
”, with nosudo
. – Haya