Wiki | Community | Discussion Forum | Q&A

Problems with exercises of drones

Hi,
I have a problem. When I use roslaunch in any exercise of drones, I receive the following error and thus, I cannot load gazebo

INFO [px4] Creating symlink /home/carlosc/catkin_ws/src/Firmware/build/px4_sitl_default/etc -> /home/carlosc/.ros/etc
ERROR [px4] Error opening startup file, does not exist: etc/init.d-posix/rcS

How can I fix it ? I have followed all steps of MavROS and PX4 instalation.

Cheers

Hi @carlos_caminero ,

Could you post the whole console error including your command?

Pedro.

Hi @pariasp, here is the console error:

carlosc@carlosc-ubuntu18:~/Academy/exercises/follow_road$ roslaunch follow_road.launch
… logging to /home/carlosc/.ros/log/afa8426a-443d-11eb-a654-f8e4e3de9c02/roslaunch-carlosc-ubuntu18-4760.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://carlosc-ubuntu18:42245/

SUMMARY

CLEAR PARAMETERS

  • /mavros/

PARAMETERS

  • /gazebo/enable_ros_network: True
  • /mavros/cmd/use_comp_id_system_control: False
  • /mavros/conn/heartbeat_rate: 1.0
  • /mavros/conn/system_time_rate: 1.0
  • /mavros/conn/timeout: 10.0
  • /mavros/conn/timesync_rate: 10.0
  • /mavros/distance_sensor/hrlv_ez4_pub/field_of_view: 0.0
  • /mavros/distance_sensor/hrlv_ez4_pub/frame_id: hrlv_ez4_sonar
  • /mavros/distance_sensor/hrlv_ez4_pub/id: 0
  • /mavros/distance_sensor/hrlv_ez4_pub/orientation: PITCH_270
  • /mavros/distance_sensor/hrlv_ez4_pub/send_tf: True
  • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/x: 0.0
  • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/y: 0.0
  • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/z: -0.1
  • /mavros/distance_sensor/laser_1_sub/id: 3
  • /mavros/distance_sensor/laser_1_sub/orientation: PITCH_270
  • /mavros/distance_sensor/laser_1_sub/subscriber: True
  • /mavros/distance_sensor/lidarlite_pub/field_of_view: 0.0
  • /mavros/distance_sensor/lidarlite_pub/frame_id: lidarlite_laser
  • /mavros/distance_sensor/lidarlite_pub/id: 1
  • /mavros/distance_sensor/lidarlite_pub/orientation: PITCH_270
  • /mavros/distance_sensor/lidarlite_pub/send_tf: True
  • /mavros/distance_sensor/lidarlite_pub/sensor_position/x: 0.0
  • /mavros/distance_sensor/lidarlite_pub/sensor_position/y: 0.0
  • /mavros/distance_sensor/lidarlite_pub/sensor_position/z: -0.1
  • /mavros/distance_sensor/sonar_1_sub/id: 2
  • /mavros/distance_sensor/sonar_1_sub/orientation: PITCH_270
  • /mavros/distance_sensor/sonar_1_sub/subscriber: True
  • /mavros/fake_gps/eph: 2.0
  • /mavros/fake_gps/epv: 2.0
  • /mavros/fake_gps/fix_type: 3
  • /mavros/fake_gps/geo_origin/alt: 408.0
  • /mavros/fake_gps/geo_origin/lat: 47.3667
  • /mavros/fake_gps/geo_origin/lon: 8.55
  • /mavros/fake_gps/gps_rate: 5.0
  • /mavros/fake_gps/mocap_transform: True
  • /mavros/fake_gps/satellites_visible: 5
  • /mavros/fake_gps/tf/child_frame_id: fix
  • /mavros/fake_gps/tf/frame_id: map
  • /mavros/fake_gps/tf/listen: False
  • /mavros/fake_gps/tf/rate_limit: 10.0
  • /mavros/fake_gps/tf/send: False
  • /mavros/fake_gps/use_mocap: True
  • /mavros/fake_gps/use_vision: False
  • /mavros/fcu_protocol: v2.0
  • /mavros/fcu_url: udp://:14540@loca…
  • /mavros/gcs_url:
  • /mavros/global_position/child_frame_id: base_link
  • /mavros/global_position/frame_id: map
  • /mavros/global_position/gps_uere: 1.0
  • /mavros/global_position/rot_covariance: 99999.0
  • /mavros/global_position/tf/child_frame_id: base_link
  • /mavros/global_position/tf/frame_id: map
  • /mavros/global_position/tf/global_frame_id: earth
  • /mavros/global_position/tf/send: False
  • /mavros/global_position/use_relative_alt: True
  • /mavros/image/frame_id: px4flow
  • /mavros/imu/angular_velocity_stdev: 0.0003490659 // 0…
  • /mavros/imu/frame_id: base_link
  • /mavros/imu/linear_acceleration_stdev: 0.0003
  • /mavros/imu/magnetic_stdev: 0.0
  • /mavros/imu/orientation_stdev: 1.0
  • /mavros/landing_target/camera/fov_x: 2.0071286398
  • /mavros/landing_target/camera/fov_y: 2.0071286398
  • /mavros/landing_target/image/height: 480
  • /mavros/landing_target/image/width: 640
  • /mavros/landing_target/land_target_type: VISION_FIDUCIAL
  • /mavros/landing_target/listen_lt: False
  • /mavros/landing_target/mav_frame: LOCAL_NED
  • /mavros/landing_target/target_size/x: 0.3
  • /mavros/landing_target/target_size/y: 0.3
  • /mavros/landing_target/tf/child_frame_id: camera_center
  • /mavros/landing_target/tf/frame_id: landing_target
  • /mavros/landing_target/tf/listen: False
  • /mavros/landing_target/tf/rate_limit: 10.0
  • /mavros/landing_target/tf/send: True
  • /mavros/local_position/frame_id: map
  • /mavros/local_position/tf/child_frame_id: base_link
  • /mavros/local_position/tf/frame_id: map
  • /mavros/local_position/tf/send: False
  • /mavros/local_position/tf/send_fcu: False
  • /mavros/mission/pull_after_gcs: True
  • /mavros/mission/use_mission_item_int: True
  • /mavros/mocap/use_pose: True
  • /mavros/mocap/use_tf: False
  • /mavros/odometry/fcu/odom_child_id_des: base_link
  • /mavros/odometry/fcu/odom_parent_id_des: map
  • /mavros/plugin_blacklist: [‘safety_area’, '…
  • /mavros/plugin_whitelist: []
  • /mavros/px4flow/frame_id: px4flow
  • /mavros/px4flow/ranger_fov: 0.118682
  • /mavros/px4flow/ranger_max_range: 5.0
  • /mavros/px4flow/ranger_min_range: 0.3
  • /mavros/safety_area/p1/x: 1.0
  • /mavros/safety_area/p1/y: 1.0
  • /mavros/safety_area/p1/z: 1.0
  • /mavros/safety_area/p2/x: -1.0
  • /mavros/safety_area/p2/y: -1.0
  • /mavros/safety_area/p2/z: -1.0
  • /mavros/setpoint_accel/send_force: False
  • /mavros/setpoint_attitude/reverse_thrust: False
  • /mavros/setpoint_attitude/tf/child_frame_id: target_attitude
  • /mavros/setpoint_attitude/tf/frame_id: map
  • /mavros/setpoint_attitude/tf/listen: False
  • /mavros/setpoint_attitude/tf/rate_limit: 50.0
  • /mavros/setpoint_attitude/use_quaternion: False
  • /mavros/setpoint_position/mav_frame: LOCAL_NED
  • /mavros/setpoint_position/tf/child_frame_id: target_position
  • /mavros/setpoint_position/tf/frame_id: map
  • /mavros/setpoint_position/tf/listen: False
  • /mavros/setpoint_position/tf/rate_limit: 50.0
  • /mavros/setpoint_raw/thrust_scaling: 1.0
  • /mavros/setpoint_velocity/mav_frame: LOCAL_NED
  • /mavros/startup_px4_usb_quirk: True
  • /mavros/sys/disable_diag: False
  • /mavros/sys/min_voltage: 10.0
  • /mavros/target_component_id: 1
  • /mavros/target_system_id: 1
  • /mavros/tdr_radio/low_rssi: 40
  • /mavros/time/time_ref_source: fcu
  • /mavros/time/timesync_avg_alpha: 0.6
  • /mavros/time/timesync_mode: MAVLINK
  • /mavros/vibration/frame_id: base_link
  • /mavros/vision_pose/tf/child_frame_id: vision_estimate
  • /mavros/vision_pose/tf/frame_id: odom
  • /mavros/vision_pose/tf/listen: False
  • /mavros/vision_pose/tf/rate_limit: 10.0
  • /mavros/vision_speed/listen_twist: True
  • /mavros/vision_speed/twist_cov: True
  • /mavros/wheel_odometry/child_frame_id: base_link
  • /mavros/wheel_odometry/count: 2
  • /mavros/wheel_odometry/frame_id: odom
  • /mavros/wheel_odometry/send_raw: True
  • /mavros/wheel_odometry/send_twist: False
  • /mavros/wheel_odometry/tf/child_frame_id: base_link
  • /mavros/wheel_odometry/tf/frame_id: odom
  • /mavros/wheel_odometry/tf/send: False
  • /mavros/wheel_odometry/use_rpm: False
  • /mavros/wheel_odometry/vel_error: 0.1
  • /mavros/wheel_odometry/wheel0/radius: 0.05
  • /mavros/wheel_odometry/wheel0/x: 0.0
  • /mavros/wheel_odometry/wheel0/y: -0.15
  • /mavros/wheel_odometry/wheel1/radius: 0.05
  • /mavros/wheel_odometry/wheel1/x: 0.0
  • /mavros/wheel_odometry/wheel1/y: 0.15
  • /rosdistro: melodic
  • /rosversion: 1.14.10
  • /use_sim_time: True

NODES
/
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
mavros (mavros/mavros_node)
my_solution (drone_wrapper/play_python_code)
rqt_gui (rqt_gui/rqt_gui)
sitl (px4/px4)
vehicle_spawn_carlosc_ubuntu18_4760_2931240773436052132 (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [4771]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to afa8426a-443d-11eb-a654-f8e4e3de9c02
process[rosout-1]: started with pid [4782]
started core service [/rosout]
process[sitl-2]: started with pid [4790]
INFO [px4] Creating symlink /home/carlosc/catkin_ws/src/Firmware/build/px4_sitl_default/etc -> /home/carlosc/.ros/etc
ERROR [px4] Error opening startup file, does not exist: etc/init.d-posix/rcS
process[gazebo-3]: started with pid [4791]
process[gazebo_gui-4]: started with pid [4796]
process[vehicle_spawn_carlosc_ubuntu18_4760_2931240773436052132-5]: started with pid [4799]
process[mavros-6]: started with pid [4802]
process[rqt_gui-7]: started with pid [4803]
process[my_solution-8]: started with pid [4804]
================================================================================REQUIRED process [sitl-2] has died!
process has died [pid 4790, exit code 255, cmd /home/carlosc/catkin_ws/devel/lib/px4/px4 /home/carlosc/catkin_ws/src/Firmware/build/px4_sitl_default/etc -s etc/init.d-posix/rcS __name:=sitl __log:=/home/carlosc/.ros/log/afa8426a-443d-11eb-a654-f8e4e3de9c02/sitl-2.log].
log file: /home/carlosc/.ros/log/afa8426a-443d-11eb-a654-f8e4e3de9c02/sitl-2*.log
Initiating shutdown!

[my_solution-8] killing on exit
[vehicle_spawn_carlosc_ubuntu18_4760_2931240773436052132-5] killing on exit
[mavros-6] killing on exit
[gazebo-3] killing on exit
[sitl-2] killing on exit
[rqt_gui-7] killing on exit
[gazebo_gui-4] killing on exit
Traceback (most recent call last):
File “/opt/ros/melodic/lib/rqt_gui/rqt_gui”, line 11, in
from rqt_gui.main import Main
File “/opt/ros/melodic/lib/python2.7/dist-packages/rqt_gui/main.py”, line 41, in
Traceback (most recent call last):
import rospy
File “/opt/ros/melodic/lib/gazebo_ros/spawn_model”, line 20, in
File “/opt/ros/melodic/lib/python2.7/dist-packages/rospy/init.py”, line 47, in
import rospy
File “/opt/ros/melodic/lib/python2.7/dist-packages/rospy/init.py”, line 47, in
from std_msgs.msg import Header
from std_msgs.msg import Header
File “/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/init.py”, line 3, in
File “/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/init.py”, line 1, in
from ._Bool import *
from ._ByteMultiArray import *
File “/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/_Bool.py”, line 6, in
File “/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/_ByteMultiArray.py”, line 2, in
import genpy
“”“autogenerated by genpy from std_msgs/ByteMultiArray.msg. Do not edit.”""
File “/opt/ros/melodic/lib/python2.7/dist-packages/genpy/init.py”, line 34, in
KeyboardInterrupt
from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
File “/opt/ros/melodic/lib/python2.7/dist-packages/genpy/message.py”, line 46, in
import genmsg
File “/opt/ros/melodic/lib/python2.7/dist-packages/genmsg/init.py”, line 33, in
from . base import MSG_DIR, SRV_DIR, EXT_MSG, EXT_SRV, SEP, log, plog, InvalidMsgSpec, log_verbose, MsgGenerationException
File “/opt/ros/melodic/lib/python2.7/dist-packages/genmsg/base.py”, line 52, in
import inspect, pprint
File “/usr/lib/python2.7/inspect.py”, line 1000, in
Traceback = namedtuple(‘Traceback’, ‘filename lineno function code_context index’)
File “/usr/lib/python2.7/collections.py”, line 386, in namedtuple
exec class_definition in namespace
File “”, line 1, in
KeyboardInterrupt
Traceback (most recent call last):
File “/home/carlosc/Academy/exercises/follow_road/my_solution.py”, line 3, in
import rospy
File “/opt/ros/melodic/lib/python2.7/dist-packages/rospy/init.py”, line 47, in
from std_msgs.msg import Header
File “/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/init.py”, line 1, in
from ._Bool import *
File “/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/_Bool.py”, line 6, in
import genpy
File “/opt/ros/melodic/lib/python2.7/dist-packages/genpy/init.py”, line 34, in
from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
File “/opt/ros/melodic/lib/python2.7/dist-packages/genpy/message.py”, line 48, in
import yaml
File “/usr/lib/python2.7/dist-packages/yaml/init.py”, line 8, in
from loader import *
File “/usr/lib/python2.7/dist-packages/yaml/loader.py”, line 4, in
from reader import *
File “/usr/lib/python2.7/dist-packages/yaml/reader.py”, line 47, in
class Reader(object):
File “/usr/lib/python2.7/dist-packages/yaml/reader.py”, line 140, in Reader
NON_PRINTABLE = re.compile(u’[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\uD7FF\uE000-\uFFFD\U00010000-\U0010ffff]’)
File “/usr/lib/python2.7/re.py”, line 194, in compile
return _compile(pattern, flags)
File “/usr/lib/python2.7/re.py”, line 249, in _compile
p = sre_compile.compile(pattern, flags)
File “/usr/lib/python2.7/sre_compile.py”, line 576, in compile
code = _code(p, flags)
File “/usr/lib/python2.7/sre_compile.py”, line 561, in _code
_compile(code, p.data, flags)
File “/usr/lib/python2.7/sre_compile.py”, line 107, in _compile
_compile_charset(av, flags, code, fixup, fixes)
File “/usr/lib/python2.7/sre_compile.py”, line 232, in _compile_charset
flags & SRE_FLAG_UNICODE):
File “/usr/lib/python2.7/sre_compile.py”, line 274, in _optimize_charset
r = range(av[0], av[1]+1)
KeyboardInterrupt
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor…
… shutting down processing monitor complete
done

I don’t know if I have to install something else.

Cheers

Hi @carlos_caminero,

Sorry for the late response.

It seems to be a problem with PX4. Try to launch roslaunch px4 mavros_posix_sitl.launch to check the PX4-MAVROS installation.

If the problem persists, try to reinstall the software. You can follow our Academy instructions. However, PX4 instructions might changed, so you can also follow the official instructions. Notice that the script ubuntu_sim_ros_melodic.sh might work.

Cheers,
Pedro.