CopterExpress / clover

ROS-based framework and RPi image to control PX4-powered drones 🍀
https://clover.coex.tech
MIT License
416 stars 266 forks source link

RLException: Unable to launch [sitl_0-3]. #453

Closed lucasmartins131 closed 1 year ago

lucasmartins131 commented 2 years ago

After native installation with no errors reported I've got this message when running the roslaunch clover_simulation simulator.launch

RLException: Unable to launch [sitl_0-3]. If it is a script, you may be missing a '#!' declaration at the top. The traceback for the exception was written to the log file

okalachev commented 2 years ago

Can you please provide the full console log of your run? Without that it's hard to say what is the issue.

lucasmartins131 commented 2 years ago

image

okalachev commented 2 years ago

Are you sure you sourced ROS' and catkin_ws setup.bash files?

lucasmartins131 commented 2 years ago

The bash file was wrong, but now I corrected it. One of the errors is not found anymore, Gazebo now is opening, but I am still getting the following errors.

image

okalachev commented 2 years ago

Have you symlinked the Clover airframe file to PX4 source?

ln -s ~/catkin_ws/src/clover/clover_simulation/airframes/* ~/PX4-Autopilot/ROMFS/px4fmu_common/init.d-posix/airframes/
lucasmartins131 commented 2 years ago

seams to be working better now. But I still got some errors:

ERROR: cannot launch node of type [mavros_extras/visualization]: Cannot locate node of type [visualization] in package [mavros_extras]. Make sure file exists in package path and permission is set to executable (chmod +x)

[ERROR] [1661449371.634602863]: ros.mavros: Plugin ftp load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::FTPPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()

lucasmartins131 commented 2 years ago

I also tried to call a service, with no sucesss:

image

okalachev commented 2 years ago

Are you sure you have installed mavros and mavros_extras correctly?

lucasmartins131 commented 2 years ago

I made the command rosdep install --from-paths src --ignore-src -y as mentioned in the "Native Setup". Also the mavros services are available when I call rosservice list. Is there other way to check the proper installation ?

okalachev commented 2 years ago

Is there a connection between mavros and PX4? What mavros/state topic says? Please, add a log of your latest run, better in a text form as your screenshots don't cover the whole output.

lucasmartins131 commented 2 years ago

This is the full log after PX4 starts :

px4 starting.

INFO  [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
Info: found model autostart file as SYS_AUTOSTART=4500
INFO  [param] selected parameter default file eeprom/parameters_4500
process[spawn_lenovo_29837_9067371672224030745-5]: started with pid [29895]
INFO  [parameters] BSON document size 444 bytes, decoded 444 bytes
[param] Loaded: eeprom/parameters_4500
process[mavros-6]: started with pid [29903]
process[rangefinder_frame-7]: started with pid [29912]
ERROR: cannot launch node of type [mavros_extras/visualization]: Cannot locate node of type [visualization] in package [mavros_extras]. Make sure file exists in package path and permission is set to executable (chmod +x)
process[web_video_server-9]: started with pid [29923]
process[vpe_publisher-10]: started with pid [29938]
process[optical_flow-11]: started with pid [29943]
process[map_flipped_frame-12]: started with pid [29956]
[ INFO] [1661453303.248368572]: ros.clover: using data topic
process[simple_offboard-13]: started with pid [29958]
process[main_camera_frame-14]: started with pid [29972]
[ INFO] [1661453303.298167409]: ros.nodelet: Loading nodelet /optical_flow of type clover/optical_flow to manager main_camera_nodelet_manager with the following remappings:
process[main_camera_nodelet_manager-15]: started with pid [29983]
[ INFO] [1661453303.313306207]: ros.nodelet: /camera_info -> /main_camera/camera_info
[ INFO] [1661453303.313362989]: ros.nodelet: /image_raw -> /main_camera/image_raw
process[main_camera/main_camera_markers-16]: started with pid [29995]
process[rosbridge_websocket-17]: started with pid [30003]
process[rosapi-18]: started with pid [30009]
[ INFO] [1661453303.377325281]: ros.roscpp: waitForService: Service [/main_camera_nodelet_manager/load_nodelet] has not been advertised, waiting...
process[tf2_web_republisher-19]: started with pid [30015]
process[led/led_effect-20]: started with pid [30029]
process[roswww_static-21]: started with pid [30041]
[ INFO] [1661453303.406398454]: ros.mavros: FCU URL: udp://@127.0.0.1:14580
[ INFO] [1661453303.416129740]: ros.rosconsole_bridge.mavconn: udp0: Bind address: 0.0.0.0:14555
[ INFO] [1661453303.416294218]: ros.rosconsole_bridge.mavconn: udp0: Remote address: 127.0.0.1:14580
[ INFO] [1661453303.417127223]: ros.mavros: GCS bridge disabled
[ INFO] [1661453303.465729877]: ros.clover: ready
INFO  [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes
PX4 SIM HOST: localhost
[ INFO] [1661453303.502866021]: ros.mavros: Plugin 3dr_radio blacklisted
[ INFO] [1661453303.502938657]: ros.mavros: Plugin actuator_control blacklisted
[ INFO] [1661453303.502959540]: ros.mavros: Plugin adsb blacklisted
INFO  [simulator] Waiting for simulator to accept connection on TCP port 4560
[ INFO] [1661453303.511222120]: ros.mavros: Plugin altitude loaded
[ INFO] [1661453303.541892229]: ros.mavros: Plugin altitude initialized
[ INFO] [1661453303.542022833]: ros.mavros: Plugin cam_imu_sync blacklisted
[ INFO] [1661453303.542145545]: ros.mavros: Plugin command loaded
[ INFO] [1661453303.544990766]: ros.nodelet: Initializing nodelet with 2 worker threads.
[ INFO] [1661453303.587524016]: ros.roscpp: waitForService: Service [/main_camera_nodelet_manager/load_nodelet] is now available.
[ INFO] [1661453303.588844168]: ros.roscpp: waitForService: Service [/led/set_leds] has not been advertised, waiting...
[ INFO] [1661453303.608839076]: ros.mavros: Plugin command initialized
[ INFO] [1661453303.609072907]: ros.mavros: Plugin companion_process_status blacklisted
[ INFO] [1661453303.609238083]: ros.mavros: Plugin debug_value blacklisted
[ INFO] [1661453303.611406745]: ros.mavros: Plugin distance_sensor loaded
[ INFO] [1661453303.673298504]: ros.mavros: Plugin distance_sensor initialized
[ INFO] [1661453303.673379451]: ros.mavros: Plugin fake_gps blacklisted
[ERROR] [1661453303.673703308]: ros.mavros: Plugin ftp load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::FTPPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
[ INFO] [1661453303.673821201]: ros.mavros: Plugin global_position loaded
[ INFO] [1661453303.732347626]: ros.mavros: Plugin global_position initialized
[ INFO] [1661453303.732469709]: ros.mavros: Plugin gps_rtk blacklisted
[ INFO] [1661453303.732525932]: ros.mavros: Plugin hil blacklisted
[ INFO] [1661453303.732575171]: ros.mavros: Plugin home_position blacklisted
[ INFO] [1661453303.732693204]: ros.mavros: Plugin imu loaded
[ INFO] [1661453303.762379937]: ros.mavros: Plugin imu initialized
[ INFO] [1661453303.762543857]: ros.mavros: Plugin landing_target blacklisted
[ INFO] [1661453303.762688010]: ros.mavros: Plugin local_position loaded
[ INFO] [1661453303.763001950]: ros.clover: ready
[ INFO] [1661453303.781296137]: ros.mavros: Plugin local_position initialized
[ INFO] [1661453303.781532761]: ros.mavros: Plugin log_transfer blacklisted
[ERROR] [1661453303.781941337]: ros.mavros: Plugin manual_control load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::ManualControlPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
[ INFO] [1661453303.782134100]: ros.mavros: Plugin mocap_pose_estimate blacklisted
[ INFO] [1661453303.782248990]: ros.mavros: Plugin mount_control blacklisted
[ INFO] [1661453303.782350191]: ros.mavros: Plugin obstacle_distance blacklisted
[ INFO] [1661453303.782465710]: ros.mavros: Plugin odom blacklisted
[ INFO] [1661453303.782567609]: ros.mavros: Plugin onboard_computer_status blacklisted
[ INFO] [1661453303.782753110]: ros.mavros: Plugin param loaded
[ INFO] [1661453303.793159628]: ros.mavros: Plugin param initialized
[ERROR] [1661453303.793486837]: ros.mavros: Plugin px4flow load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::PX4FlowPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
[ INFO] [1661453303.793531816]: ros.mavros: Plugin rangefinder blacklisted
[ INFO] [1661453303.793603194]: ros.mavros: Plugin rc_io loaded
[ INFO] [1661453303.799532844]: ros.mavros: Plugin rc_io initialized
[ INFO] [1661453303.799608273]: ros.mavros: Plugin safety_area blacklisted
[ INFO] [1661453303.799645988]: ros.mavros: Plugin setpoint_accel blacklisted
[ERROR] [1661453303.799909711]: ros.mavros: Plugin setpoint_attitude load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::SetpointAttitudePlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
[ERROR] [1661453303.800141098]: ros.mavros: Plugin setpoint_position load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::SetpointPositionPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
[ INFO] [1661453303.800244673]: ros.mavros: Plugin setpoint_raw loaded
[ INFO] [1661453303.819052059]: ros.mavros: Plugin setpoint_raw initialized
[ INFO] [1661453303.819128396]: ros.mavros: Plugin setpoint_trajectory blacklisted
[ERROR] [1661453303.819436469]: ros.mavros: Plugin setpoint_velocity load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::SetpointVelocityPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
[ INFO] [1661453303.819552476]: ros.mavros: Plugin sys_status loaded
[ INFO] [1661453303.841235324]: ros.mavros: Plugin sys_status initialized
[ INFO] [1661453303.841384577]: ros.mavros: Plugin sys_time loaded
[ INFO] [1661453303.857234296]: ros.mavros.time: TM: Timesync mode: MAVLINK
[ INFO] [1661453303.866530886]: ros.mavros: Plugin sys_time initialized
[ INFO] [1661453303.866700742]: ros.mavros: Plugin trajectory blacklisted
[ INFO] [1661453303.866812698]: ros.mavros: Plugin vfr_hud blacklisted
[ INFO] [1661453303.866924027]: ros.mavros: Plugin vibration blacklisted
[ERROR] [1661453303.867188099]: ros.mavros: Plugin vision_pose_estimate load exception: MultiLibraryClassLoader: Could not create object of class type mavros::extra_plugins::VisionPoseEstimatePlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()
[ INFO] [1661453303.867233496]: ros.mavros: Plugin vision_speed_estimate blacklisted
[ INFO] [1661453303.867294538]: ros.mavros: Plugin waypoint blacklisted
[ INFO] [1661453303.867335884]: ros.mavros: Plugin wheel_odometry blacklisted
[ INFO] [1661453303.867369897]: ros.mavros: Plugin wind_estimation blacklisted
[ INFO] [1661453303.867417180]: ros.mavros: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1661453303.867447143]: ros.mavros: Built-in MAVLink package version: 2020.6.6
[ INFO] [1661453303.867481575]: ros.mavros: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1661453303.867514959]: ros.mavros: MAVROS started. MY ID 1.240, TARGET ID 1.1
[INFO] [1661453303.877243, 0.000000]: Loading model XML from ros parameter drone_description
[INFO] [1661453303.892479, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[ INFO] [1661453303.911606872]: ros.clover./optical_flow: Optical Flow initialized
[INFO] [1661453303.950311, 0.000000]: rosout: Rosapi started
Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Wrn] [GuiIface.cc:200] g/gui-plugin is really loading a SystemPlugin. To load a GUI plugin please use --gui-client-plugin 
2022-08-25 15:48:24-0300 [-] Log opened.
2022-08-25 15:48:24-0300 [-] registered capabilities (classes):
2022-08-25 15:48:24-0300 [-]  - <class 'rosbridge_library.capabilities.call_service.CallService'>
2022-08-25 15:48:24-0300 [-]  - <class 'rosbridge_library.capabilities.advertise.Advertise'>
2022-08-25 15:48:24-0300 [-]  - <class 'rosbridge_library.capabilities.publish.Publish'>
2022-08-25 15:48:24-0300 [-]  - <class 'rosbridge_library.capabilities.subscribe.Subscribe'>
2022-08-25 15:48:24-0300 [-]  - <class 'rosbridge_library.capabilities.defragmentation.Defragment'>
2022-08-25 15:48:24-0300 [-]  - <class 'rosbridge_library.capabilities.advertise_service.AdvertiseService'>
2022-08-25 15:48:24-0300 [-]  - <class 'rosbridge_library.capabilities.service_response.ServiceResponse'>
2022-08-25 15:48:24-0300 [-]  - <class 'rosbridge_library.capabilities.unadvertise_service.UnadvertiseService'>
[ERROR] [1661453304.095452567]: ros.roscpp: Client [/simple_offboard] wants topic /mavros/state to have datatype/md5sum [mavros_msgs/State/65cd0a9fff993b062b91e354554ec7e9], but our version has [mavros_msgs/State/ce783f756cab1193cb71ba9e90fece50]. Dropping connection.
Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[ INFO] [1661453304.235027345]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1661453304.238133356]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.0.108
2022-08-25 15:48:24-0300 [-] WebSocketServerFactory starting on 9090
2022-08-25 15:48:24-0300 [-] Starting factory <autobahn.twisted.websocket.WebSocketServerFactory object at 0x7fabf0947190>
2022-08-25 15:48:24-0300 [-] [INFO] [1661453304.266282, 0.000000]: rosout: Rosbridge WebSocket server started at ws://0.0.0.0:9090
[ INFO] [1661453304.332611196]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1661453304.334995739]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.0.108
[roswww_static-21] process has finished cleanly
log file: /home/lucas/.ros/log/7e0f94ba-24a6-11ed-80dc-4156f21276dd/roswww_static-21*.log
[Msg] Loading world file [/home/lucas/clover_ws/src/clover/clover_simulation/resources/worlds/clover_aruco.world]
[ INFO] [1661453304.971169027]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1661453305.048030566, 0.028000000]: Physics dynamic reconfigure ready.
[INFO] [1661453305.107778, 0.088000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1661453305.377389, 0.112000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1661453305.924037773, 0.112000000]: Camera Plugin: Using the 'robotNamespace' param: '/'
[ INFO] [1661453305.929965118, 0.112000000]: Camera Plugin (ns = /)  <tf_prefix_>, set to ""
[Msg] Connecting to PX4 SITL using TCP
[Msg] Lockstep is enabled
[Msg] Speed factor set to: 1
[Wrn] [gazebo_mavlink_interface.cpp:152] No identifier on joint. Using 0 as default sensor ID
[Msg] Using MAVLink protocol v2.0
INFO  [simulator] Simulator connected on TCP port 4560.
[ INFO] [1661453306.129931657, 0.112000000]: Initialize LED Controller
[ INFO] [1661453306.139531151, 0.120000000]: ros.roscpp: waitForService: Service [/led/set_leds] is now available.
[spawn_lenovo_29837_9067371672224030745-5] process has finished cleanly
log file: /home/lucas/.ros/log/7e0f94ba-24a6-11ed-80dc-4156f21276dd/spawn_lenovo_29837_9067371672224030745-5*.log
INFO  [commander] LED: open /dev/led0 failed (22)
[Wrn] [sim_leds.cpp:112] Creating new LED controller for namespace 
[ INFO] [1661453306.223522433, 0.204000000]: LedController has started (as client)
INFO  [init] Mixer: etc/mixers/quad_w.main.mix on /dev/pwm_output0
INFO  [ekf2] starting instance 0, IMU:0 (1310988), MAG:0 (197388)
INFO  [ekf2] starting instance 1, IMU:1 (1310996), MAG:0 (197388)
[Wrn] [sim_leds.cpp:112] Creating new LED controller for namespace 
[ INFO] [1661453306.284292599, 0.264000000]: LedController has started (as server)
INFO  [ekf2] starting instance 2, IMU:2 (1311004), MAG:0 (197388)
INFO  [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
INFO  [ekf2] starting instance 3, IMU:0 (1310988), MAG:1 (197644)
INFO  [ekf2] starting instance 4, IMU:1 (1310996), MAG:1 (197644)
INFO  [ekf2] starting instance 5, IMU:2 (1311004), MAG:1 (197644)
[ INFO] [1661453306.349003037, 0.320000000]: ros.clover: ready
INFO  [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO  [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030
INFO  [mavlink] mode: Gimbal, data rate: 400000 B/s on udp port 13030 remote port 13280
INFO  [logger] logger started (mode=all)
INFO  [logger] Start file log (type: full)
INFO  [logger] [logger] ./log/2022-08-25/18_48_26.ulg
INFO  [logger] Opened full log file: ./log/2022-08-25/18_48_26.ulg
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [px4] Startup script returned successfully
pxh> [Wrn] [ColladaLoader.cc:1928] Triangle input semantic: 'COLOR' is currently not supported
INFO  [mavlink] partner IP: 127.0.0.1
[ INFO] [1661453306.507901819, 0.480000000]: ros.rosconsole_bridge.mavconn: udp0: Remote address: 127.0.0.1:14580
INFO  [ekf2] 1 - selected distance_sensor:0
INFO  [ekf2] 0 - selected distance_sensor:0
INFO  [ekf2] 2 - selected distance_sensor:0
INFO  [ekf2] 5 - selected distance_sensor:0
INFO  [ekf2] 3 - selected distance_sensor:0
INFO  [ekf2] 4 - selected distance_sensor:0
[ INFO] [1661453306.515837120, 0.488000000]: ros.mavros.imu: IMU: High resolution IMU detected!
[ERROR] [1661453306.535572705, 0.504000000]: ros.roscpp: Client [/led/led_effect] wants topic /mavros/state to have datatype/md5sum [mavros_msgs/State/65cd0a9fff993b062b91e354554ec7e9], but our version has [mavros_msgs/State/ce783f756cab1193cb71ba9e90fece50]. Dropping connection.
[Wrn] [ColladaLoader.cc:1928] Triangle input semantic: 'COLOR' is currently not supported
INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
INFO  [ecl/EKF] reset position to last known position
INFO  [ecl/EKF] reset velocity to zero
[Wrn] [ColladaLoader.cc:1928] Triangle input semantic: 'COLOR' is currently not supported
[Wrn] [ColladaLoader.cc:1928] Triangle input semantic: 'COLOR' is currently not supported
[Wrn] [ColladaLoader.cc:1928] Triangle input semantic: 'COLOR' is currently not supported
[Wrn] [ColladaLoader.cc:1928] Triangle input semantic: 'COLOR' is currently not supported
[Wrn] [ColladaLoader.cc:1928] Triangle input semantic: 'COLOR' is currently not supported
[Wrn] [ColladaLoader.cc:1928] Triangle input semantic: 'COLOR' is currently not supported
[ INFO] [1661453307.412406623, 1.376000000]: ros.mavros: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1661453307.420150278, 1.388000000]: ros.mavros.imu: IMU: High resolution IMU detected!
[ INFO] [1661453307.492758302, 1.456000000]: ros.clover: ROI: 121 81 - 200 160 
[ INFO] [1661453308.421888249, 2.384000000]: ros.mavros.sys: VER: 1.1: Capabilities         0x000000000000e4ef
[ INFO] [1661453308.421996643, 2.388000000]: ros.mavros.sys: VER: 1.1: Flight software:     010c00ff (9524e8ec03000000)
[ INFO] [1661453308.422067184, 2.388000000]: ros.mavros.sys: VER: 1.1: Middleware software: 010c00ff (9524e8ec03000000)
[ INFO] [1661453308.422138702, 2.388000000]: ros.mavros.sys: VER: 1.1: OS software:         050f00ff (76bb42f3ebd90210)
[ INFO] [1661453308.422202677, 2.388000000]: ros.mavros.sys: VER: 1.1: Board hardware:      00000001
[ INFO] [1661453308.422258551, 2.388000000]: ros.mavros.sys: VER: 1.1: VID/PID:             0000:0000
[ INFO] [1661453308.422329999, 2.388000000]: ros.mavros.sys: VER: 1.1: UID:                 4954414c44494e4f
INFO  [ecl/EKF] 4336000: EKF aligned, (rng hgt, IMU buf: 11, OBS buf: 8)
INFO  [ecl/EKF] 4336000: EKF aligned, (rng hgt, IMU buf: 11, OBS buf: 8)
[ INFO] [1661453310.705098854, 4.560000000]: ros.mavros.imu: IMU: Attitude quaternion IMU detected!
INFO  [ecl/EKF] 4400000: EKF aligned, (rng hgt, IMU buf: 11, OBS buf: 8)
INFO  [ecl/EKF] 4404000: EKF aligned, (rng hgt, IMU buf: 11, OBS buf: 8)
INFO  [ecl/EKF] 4408000: EKF aligned, (rng hgt, IMU buf: 11, OBS buf: 8)
INFO  [ecl/EKF] 4408000: EKF aligned, (rng hgt, IMU buf: 11, OBS buf: 8)
[ INFO] [1661453316.155726710, 10.000000000]: ros.clover: publish zero
[ INFO] [1661453326.176704818, 20.000000000]: ros.clover: publish zero
lucasmartins131 commented 2 years ago

This is the output of mavros/state:

header: seq: 136 stamp: secs: 136 nsecs: 380000000 frame_id: '' connected: True armed: False guided: False manual_input: True mode: "MANUAL" system_status: 3

okalachev commented 2 years ago

I don't see any errors here. The "State timeout, check mavros settings" error could happen, only when mavros is not connected (connected: False in mavros state).

lucasmartins131 commented 2 years ago

What about this:

ERROR: cannot launch node of type [mavros_extras/visualization]: Cannot locate node of type [visualization] in package [mavros_extras]. Make sure file exists in package path and permission is set to executable (chmod +x)

[ERROR] [1661453303.673703308]: ros.mavros: Plugin ftp load exception: MultiLibraryClassLoader: Could not create object of class type mavros::std_plugins::FTPPlugin as no factory exists for it. Make sure that the library exists and was explicitly loaded through MultiLibraryClassLoader::loadLibrary()

lucasmartins131 commented 2 years ago

And Also this behavior when I try to call the navigate service :

lucas@lenovo:~$ rosservice call /navigate "{x: 0.0, y: 0.0, z: 5.0, yaw: 0.0, yaw_rate: 0.0, speed: 0.0, frame_id: 'body', auto_arm: true}" success: False message: "State timeout, check mavros settings"

okalachev commented 2 years ago

The first one makes it impossible to monitor the drone in rviz using a quadcopter-like model, in vehicle_markers topic, but it doesn't affect the flight. I would suggest to reinstall the mavros_extras package.

The second one, seemly, is error loading some of (not required) mavros plugin, but you say, that the rest of mavros is working, so it's ok.

okalachev commented 2 years ago

And Also this behavior when I try to call the navigate service :

lucas@lenovo:~$ rosservice call /navigate "{x: 0.0, y: 0.0, z: 5.0, yaw: 0.0, yaw_rate: 0.0, speed: 0.0, frame_id: 'body', auto_arm: true}" success: False message: "State timeout, check mavros settings"

So the topic mavros/state consists connected: True, and in the same time you are getting this error? This is very weird, like you're using different rosmasters or something.

lucasmartins131 commented 2 years ago

And Also this behavior when I try to call the navigate service : lucas@lenovo:~$ rosservice call /navigate "{x: 0.0, y: 0.0, z: 5.0, yaw: 0.0, yaw_rate: 0.0, speed: 0.0, frame_id: 'body', auto_arm: true}" success: False message: "State timeout, check mavros settings"

So the topic mavros/state consists connected: True, and in the same time you are getting this error? This is very weird, like you're using different rosmasters or something.

Yes it is showing connected: True. But calling this service is not working)

lucasmartins131 commented 2 years ago

And Also this behavior when I try to call the navigate service : lucas@lenovo:~$ rosservice call /navigate "{x: 0.0, y: 0.0, z: 5.0, yaw: 0.0, yaw_rate: 0.0, speed: 0.0, frame_id: 'body', auto_arm: true}" success: False message: "State timeout, check mavros settings"

So the topic mavros/state consists connected: True, and in the same time you are getting this error? This is very weird, like you're using different rosmasters or something.

The first one makes it impossible to monitor the drone in rviz using a quadcopter-like model, in vehicle_markers topic, but it doesn't affect the flight. I would suggest to reinstall the mavros_extras package.

The second one, seemly, is error loading some of (not required) mavros plugin, but you say, that the rest of mavros is working, so it's ok.

Do you know how to reeinstall mavros without calling via rosdep ?

okalachev commented 2 years ago

Do you know how to reeinstall mavros without calling via rosdep ?

sudo apt-get install ros-noetic-mavros

okalachev commented 2 years ago

Yes it is showing connected: True. But calling this service is not working)

Are you sure about that? Can you please attach a screenshot where you echo the mavros/state topic and then call the service getting this error. Because the only condition for that error is connected: False in that topic.

lucasmartins131 commented 2 years ago

Yes it is showing connected: True. But calling this service is not working)

Are you sure about that? Can you please attach a screenshot where you echo the mavros/state topic and then call the service getting this error. Because the only condition for that error is connected: False in that topic.

image

okalachev commented 2 years ago

OK, I know what is happening. I've mistaken state timeout error with no connection error. mavros publishes connected state, but then, seemingly, falls down due to Plugin ftp load exception, causing state timeout error.

You can either try to fix mavros reinstalling it, or just disable ftp plugin removing this line here https://github.com/CopterExpress/clover/blob/master/clover/launch/mavros.launch#L48. This file is located in ~/catkin_ws/src/clover/launch.

lucasmartins131 commented 2 years ago

OK, I know what is happening. I've mistaken state timeout error with no connection error. mavros publishes connected state, but then, seemingly, falls down due to Plugin ftp load exception, causing state timeout error.

You can either try to fix mavros reinstalling it, or just disable ftp plugin removing this line here https://github.com/CopterExpress/clover/blob/master/clover/launch/mavros.launch#L48. This file is located in ~/catkin_ws/src/clover/launch.

Removed the FTP line from the launch file, and tried to launch it again. No sucess. Do I have to compile the folder again ?

okalachev commented 2 years ago

No, you don't. Does mavros run well now without that ftp error? Is the /mavros/state topic published constantly at rate 1 Hz with connected: true?

lucasmartins131 commented 2 years ago

This is the output of rostopic hz /mavros/state

image

lucasmartins131 commented 2 years ago

No, you don't. Does mavros run well now without that ftp error? Is the /mavros/state topic published constantly at rate 1 Hz with connected: true?

No improvements after removing the ftp from the launch file

okalachev commented 2 years ago

As I see that the two commands are run in separate bash sessions, all I can suggest for now is to run them sequentially in one bash session to ensure that the evrironment variables and ROS master are the same. Otherwise I cannot explain this.