Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] REQUIRED process [sitl-1] has died! #21837

Open
AlexWUrobot opened this issue Jul 11, 2023 · 6 comments
Open

[Bug] REQUIRED process [sitl-1] has died! #21837

AlexWUrobot opened this issue Jul 11, 2023 · 6 comments

Comments

@AlexWUrobot
Copy link

AlexWUrobot commented Jul 11, 2023

Describe the bug

Install the lastest MAVROS and PX4-autopilot in Ubuntu 18.04 (python 2.7)
I placed the PX4-autopliot under root, instead of any worksapce.
When running roslaunch px4 mavros_posix_sitl.launch
get error like this "=REQUIRED process [sitl-1] has died!"

image

How to reproduce

ridley2@ridley2-Alienware-Aurora-R12:~/PX4-Autopilot$ roslaunch px4 mavros_posix_sitl.launch

... logging to /home/ridley2/.ros/log/83d21e16-2010-11ee-b02d-cc6b1e18f8d5/roslaunch-ridley2-Alienware-Aurora-R12-20823.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.

SUMMARY

CLEAR PARAMETERS

  • /mavros/

PARAMETERS

  • /gazebo/enable_ros_network: True
  • /mavros/camera/frame_id: base_link
  • /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/horizontal_fov_ratio: 1.0
  • /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/distance_sensor/sonar_1_sub/vertical_fov_ratio: 1.0
  • /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/mount/debounce_s: 4.0
  • /mavros/mount/err_threshold_deg: 10.0
  • /mavros/mount/negate_measured_pitch: False
  • /mavros/mount/negate_measured_roll: False
  • /mavros/mount/negate_measured_yaw: 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: False
  • /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.13
  • /use_sim_time: True

NODES
/
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
mavros (mavros/mavros_node)
sitl (px4/px4)
vehicle_spawn_ridley2_Alienware_Aurora_R12_20823_4706267373789824166 (gazebo_ros/spawn_model)

ROS_MASTER_URI=http://localhost:11311

process[sitl-1]: started with pid [20854]
process[gazebo-2]: started with pid [20855]
process[gazebo_gui-3]: started with pid [20860]
process[vehicle_spawn_ridley2_Alienware_Aurora_R12_20823_4706267373789824166-4]: started with pid [20865]
process[mavros-5]: started with pid [20866]
-----------------------------------------------------------------------------REQUIRED process [sitl-1] has died!
process has died [pid 20854, exit code 255, cmd /home/ridley2/PX4-Autopilot/build/px4_sitl_default/bin/px4 /home/ridley2/PX4-Autopilot/build/px4_sitl_default/etc -s etc/init.d-posix/rcS __name:=sitl __log:=/home/ridley2/.ros/log/83d21e16-2010-11ee-b02d-cc6b1e18f8d5/sitl-1.log].
log file: /home/ridley2/.ros/log/83d21e16-2010-11ee-b02d-cc6b1e18f8d5/sitl-1*.log
Initiating shutdown!

[mavros-5] killing on exit
[vehicle_spawn_ridley2_Alienware_Aurora_R12_20823_4706267373789824166-4] killing on exit
Traceback (most recent call last):
File "/opt/ros/melodic/lib/gazebo_ros/spawn_model", line 20, in
import rospy
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/init.py", line 49, in
from .client import spin, myargv, init_node,
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/client.py", line 52, in
import roslib
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/init.py", line 53, in
[gazebo_gui-3] killing on exit
[gazebo-2] killing on exit
[sitl-1] killing on exit
Traceback (most recent call last):
File "/opt/ros/melodic/bin/catkin_find", line 57, in
main()
File "/opt/ros/melodic/bin/catkin_find", line 42, in main
results = find_in_workspaces(args.install_folders, args.project, args.path, first_matching_workspace_only=args.without_underlays, first_match_only=args.first_only, considered_paths=checked)
File "/opt/ros/melodic/lib/python2.7/dist-packages/catkin/find_in_workspaces.py", line 149, in find_in_workspaces
source_path_to_packages[source_path] = find_packages(source_path)
File "/usr/lib/python2.7/dist-packages/catkin_pkg/packages.py", line 94, in find_packages
ignore_markers=ignore_markers)
File "/usr/lib/python2.7/dist-packages/catkin_pkg/packages.py", line 156, in find_packages_allowing_duplicates
xml, filename=filename, warnings=warnings)
File "/usr/lib/python2.7/dist-packages/catkin_pkg/package.py", line 730, in parse_package_string
Traceback (most recent call last):
File "/opt/ros/melodic/bin/catkin_find", line 12, in
from catkin.find_in_workspaces import find_in_workspaces # noqa: E402
File "/opt/ros/melodic/lib/python2.7/dist-packages/catkin/find_in_workspaces.py", line 39, in
from catkin_pkg.packages import find_packages
File "/usr/lib/python2.7/dist-packages/catkin_pkg/packages.py", line 38, in
from .package import _get_package_xml
File "/usr/lib/python2.7/dist-packages/catkin_pkg/package.py", line 431, in
class Person(object):
KeyboardInterrupt errors += _check_known_attributes(root, ['format'])
File "/usr/lib/python2.7/dist-packages/catkin_pkg/package.py", line 589, in _check_known_attributes

attrs = map(str, node.attributes.keys())

File "/usr/lib/python2.7/xml/dom/minidom.py", line 498, in keys
import roslib.stacks # noqa: F401, I100
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/stacks.py", line 45, in
return self._attrs.keys()
KeyboardInterrupt
import roslib.packages
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/packages.py", line 48, in
from catkin.find_in_workspaces import find_in_workspaces as catkin_find
File "/opt/ros/melodic/lib/python2.7/dist-packages/catkin/find_in_workspaces.py", line 39, in
from catkin_pkg.packages import find_packages
File "/usr/lib/python2.7/dist-packages/catkin_pkg/packages.py", line 38, in
from .package import _get_package_xml
File "/usr/lib/python2.7/dist-packages/catkin_pkg/package.py", line 44, in
from catkin_pkg.condition import evaluate_condition
File "/usr/lib/python2.7/dist-packages/catkin_pkg/condition.py", line 17, in
import pyparsing as pp
File "/home/ridley2/.local/lib/python2.7/site-packages/pyparsing.py", line 6398, in
class pyparsing_common:
File "/home/ridley2/.local/lib/python2.7/site-packages/pyparsing.py", line 6598, in pyparsing_common
ipv6_address = Combine((_full_ipv6_address | _mixed_ipv6_address | _short_ipv6_address).setName("IPv6 address")).setName("IPv6 address")
File "/home/ridley2/.local/lib/python2.7/site-packages/pyparsing.py", line 5124, in init
self.leaveWhitespace()
File "/home/ridley2/.local/lib/python2.7/site-packages/pyparsing.py", line 4468, in leaveWhitespace
self.expr = self.expr.copy()
File "/home/ridley2/.local/lib/python2.7/site-packages/pyparsing.py", line 3969, in copy
ret = super(ParseExpression, self).copy()
File "/home/ridley2/.local/lib/python2.7/site-packages/pyparsing.py", line 1445, in copy
cpy = copy.copy(self)
File "/usr/lib/python2.7/copy.py", line 96, in copy
return _reconstruct(x, rv, 0)
File "/usr/lib/python2.7/copy.py", line 316, in _reconstruct
state = info[2]
KeyboardInterrupt
shutting down processing monitor...
... shutting down processing monitor complete
done

To Reproduce

git clone https://github.com/PX4/PX4-Autopilot.git --recursive
ref

cd <PX4-Autopilot_clone>
DONT_RUN=1 make px4_sitl_default gazebo-classic
source ~/catkin_ws/devel/setup.bash    # (optional)
source Tools/simulation/gazebo-classic/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/simulation/gazebo-classic/sitl_gazebo-classic
roslaunch px4 posix_sitl.launch

ref

Expected behavior

It should roslaunch successfully without error.
It should publish mavros and iris (a drone model) in the gazebo world.

Screenshot / Media

No response

Flight Log

no log

Software Version

Ubuntu 18.04

Flight controller

None

Vehicle type

None

How are the different components wired up (including port information)

No response

Additional context

Thank you very much for your help ^^
No response

@AllenHuangDongyue
Copy link

@github-actions github-actions bot added the stale label Aug 31, 2023
@JohnTGZ
Copy link

JohnTGZ commented Nov 17, 2023

I realised the error for PX4 SITL originates from line 324 to 334 of the file "platforms/posix/src/px4/common/main.cpp", from commit 2110eae:

		if (test_data_path != "") {
			const std::string required_test_data_path = "./test_data";

			if (!dir_exists(required_test_data_path)) {
				ret = symlink(test_data_path.c_str(), required_test_data_path.c_str());

				if (ret != PX4_OK) {
					return ret;
				}
			}
		}

For some reason, the test_data_path is not empty when spawning a PX4 SITL instance. As a result, the return code will not be PX4_OK and it will return -1, ending the program.

@nikhil-sethi
Copy link

For me this happened when I moved the PX4-Autopilot directory somewhere else and recompiled it in the new place. The folder ~/.ros/test_data is a symbolic link to PX4-Autopilot/test_data which doesn't get updated after recompiling. I just updated the link and things worked again.

@newawesom
Copy link

@nikhil-sethi I have the same problem when I moved the directory,so how to updated the link?

@nikhil-sethi
Copy link

@newawesom
You can use the ln command (in linux) to update the symbolic link from the source directory (~/.ros/test_data) to the target directory (wherever your new test data folder is).

ln -s <target_directory> <source_directory>

you may also have to use -f flag to force the update if the link already exists.

@newawesom
Copy link

@newawesom You can use the ln command (in linux) to update the symbolic link from the source directory (~/.ros/test_data) to the target directory (wherever your new test data folder is).

ln -s <target_directory> <source_directory>

you may also have to use -f flag to force the update if the link already exists.

@nikhil-sethi Thanks for reply!Acutually,I deleted test_data directory in PX4-Autopilot and it worked after recompiling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants