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

Can not start ROS2 Offboard example with PX4 v1.14.0 #206

Open
Cristian-wp opened this issue Oct 31, 2023 · 2 comments
Open

Can not start ROS2 Offboard example with PX4 v1.14.0 #206

Cristian-wp opened this issue Oct 31, 2023 · 2 comments

Comments

@Cristian-wp
Copy link

Hello, I am trying to run this example https://docs.px4.io/v1.14/en/ros/ros2_offboard_control.html after being able to run the sensor_combined example.
This is my current situation for the example:

  • TERMINAL 1 running the DDS Agent with
    MicroXRCEAgent udp4 -p 8888
    Output:
[1698770906.331528] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 8888
[1698770906.331864] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4
[1698770961.385489] info     | Root.cpp           | create_client            | create                 | client_key: 0x00000001, session_id: 0x81
[1698770961.385539] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0x00000001, address: 127.0.0.1:45751
[1698770961.389370] info     | ProxyClient.cpp    | create_participant       | participant created    | client_key: 0x00000001, participant_id: 0x001(1)
[1698770961.389559] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3E8(2), participant_id: 0x001(1)
[1698770961.389607] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3E8(4), participant_id: 0x001(1)
[1698770961.390793] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3E8(6), subscriber_id: 0x3E8(4)
[1698770961.390913] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3E9(2), participant_id: 0x001(1)
[1698770961.390938] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3E9(4), participant_id: 0x001(1)
[1698770961.391160] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3E9(6), subscriber_id: 0x3E9(4)
[1698770961.391312] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3EA(2), participant_id: 0x001(1)
[1698770961.391369] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3EA(4), participant_id: 0x001(1)
[1698770961.391575] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3EA(6), subscriber_id: 0x3EA(4)
[1698770961.391677] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3EB(2), participant_id: 0x001(1)
[1698770961.391722] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3EB(4), participant_id: 0x001(1)
[1698770961.391954] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3EB(6), subscriber_id: 0x3EB(4)
[1698770961.392115] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3EC(2), participant_id: 0x001(1)
[1698770961.392165] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3EC(4), participant_id: 0x001(1)
[1698770961.392447] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3EC(6), subscriber_id: 0x3EC(4)
[1698770961.392558] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3ED(2), participant_id: 0x001(1)
[1698770961.392596] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3ED(4), participant_id: 0x001(1)
[1698770961.392845] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3ED(6), subscriber_id: 0x3ED(4)
[1698770961.392959] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3EE(2), participant_id: 0x001(1)
[1698770961.392991] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3EE(4), participant_id: 0x001(1)
[1698770961.393272] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3EE(6), subscriber_id: 0x3EE(4)
[1698770961.393387] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3EF(2), participant_id: 0x001(1)
[1698770961.393422] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3EF(4), participant_id: 0x001(1)
[1698770961.393666] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3EF(6), subscriber_id: 0x3EF(4)
[1698770961.393789] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3F0(2), participant_id: 0x001(1)
[1698770961.393827] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3F0(4), participant_id: 0x001(1)
[1698770961.394057] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3F0(6), subscriber_id: 0x3F0(4)
[1698770961.394158] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3F1(2), participant_id: 0x001(1)
[1698770961.394189] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3F1(4), participant_id: 0x001(1)
[1698770961.394417] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3F1(6), subscriber_id: 0x3F1(4)
[1698770961.394520] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3F2(2), participant_id: 0x001(1)
[1698770961.394551] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3F2(4), participant_id: 0x001(1)
[1698770961.394763] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3F2(6), subscriber_id: 0x3F2(4)
[1698770961.394857] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3F3(2), participant_id: 0x001(1)
[1698770961.394884] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3F3(4), participant_id: 0x001(1)
[1698770961.395093] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3F3(6), subscriber_id: 0x3F3(4)
[1698770961.395203] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x3F4(2), participant_id: 0x001(1)
[1698770961.395233] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x00000001, subscriber_id: 0x3F4(4), participant_id: 0x001(1)
[1698770961.395466] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x00000001, datareader_id: 0x3F4(6), subscriber_id: 0x3F4(4)
[1698770961.395642] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x050(2), participant_id: 0x001(1)
[1698770961.395702] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x00000001, publisher_id: 0x050(3), participant_id: 0x001(1)
[1698770961.395937] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x00000001, datawriter_id: 0x050(5), publisher_id: 0x050(3)
[1698770961.396052] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x095(2), participant_id: 0x001(1)
[1698770961.396098] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x00000001, publisher_id: 0x095(3), participant_id: 0x001(1)
[1698770961.396217] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x00000001, datawriter_id: 0x095(5), publisher_id: 0x095(3)
[1698770961.396344] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x0A8(2), participant_id: 0x001(1)
[1698770961.396406] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x00000001, publisher_id: 0x0A8(3), participant_id: 0x001(1)
[1698770961.396567] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x00000001, datawriter_id: 0x0A8(5), publisher_id: 0x0A8(3)
[1698770961.396695] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x0BF(2), participant_id: 0x001(1)
[1698770961.396730] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x00000001, publisher_id: 0x0BF(3), participant_id: 0x001(1)
[1698770961.396840] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x00000001, datawriter_id: 0x0BF(5), publisher_id: 0x0BF(3)
[1698770961.396931] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x0D4(2), participant_id: 0x001(1)
[1698770961.396962] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x00000001, publisher_id: 0x0D4(3), participant_id: 0x001(1)
[1698770961.397070] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x00000001, datawriter_id: 0x0D4(5), publisher_id: 0x0D4(3)
[1698770961.397161] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x0D7(2), participant_id: 0x001(1)
[1698770961.397192] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x00000001, publisher_id: 0x0D7(3), participant_id: 0x001(1)
[1698770961.397294] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x00000001, datawriter_id: 0x0D7(5), publisher_id: 0x0D7(3)
[1698770961.397382] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x00000001, topic_id: 0x0E5(2), participant_id: 0x001(1)
[1698770961.397421] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x00000001, publisher_id: 0x0E5(3), participant_id: 0x001(1)
[1698770961.397521] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x00000001, datawriter_id: 0x0E5(5), publisher_id: 0x0E5(3)
  • TERMINAL 2 running PX4 and Gazebo Harmonic
    make px4_sitl gz_x500
    Output:
make px4_sitl gz_x500
[0/1] cd /home/ctrazzi/px4_v14_simulation_ws/src/PX4-Autopilot/build/px4_sitl_default/src/modules/simula...4_SIM_MODEL=gz_x500 /home/ctrazzi/px4_v14_simulation_ws/src/PX4-Autopilot/build/px4_sitl_default/bin/px4

______  __   __    ___ 
| ___ \ \ \ / /   /   |
| |_/ /  \ V /   / /| |
|  __/   /   \  / /_| |
| |     / /^\ \ \___  |
\_|     \/   \/     |_/

px4 starting.

INFO  [px4] startup script: /bin/sh etc/init.d-posix/rcS 0
INFO  [init] found model autostart file as SYS_AUTOSTART=4001
INFO  [param] selected parameter default file parameters.bson
INFO  [param] importing from 'parameters.bson'
INFO  [parameters] BSON document size 251 bytes, decoded 251 bytes (INT32:11, FLOAT:2)
INFO  [param] selected parameter backup file parameters_backup.bson
INFO  [dataman] data manager file './dataman' size is 7866640 bytes
INFO  [init] starting gazebo with world: /home/ctrazzi/px4_v14_simulation_ws/src/PX4-Autopilot/Tools/simulation/gz/worlds/default.sdf
WARN  [init] PX4_GZ_MODEL_NAME or PX4_GZ_MODEL not set using PX4_SIM_MODEL.
INFO  [gz_bridge] world: default, model name: x500_0, simulation model: x500
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Unknown message type [8].
Unknown message type [8].
Unknown message type [9].
Unknown message type [9].
Unknown message type [9].
Unknown message type [9].
Unknown message type [9].
INFO  [lockstep_scheduler] setting initial absolute time to 8000 us
INFO  [commander] LED: open /dev/led0 failed (22)
INFO  [tone_alarm] home set
INFO  [uxrce_dds_client] synchronized with time offset 1698770961179514us
INFO  [uxrce_dds_client] successfully created rt/fmu/out/failsafe_flags data writer, topic id: 80
INFO  [uxrce_dds_client] successfully created rt/fmu/out/position_setpoint_triplet data writer, topic id: 149
INFO  [uxrce_dds_client] successfully created rt/fmu/out/sensor_combined data writer, topic id: 168
INFO  [uxrce_dds_client] successfully created rt/fmu/out/timesync_status data writer, topic id: 191
INFO  [uxrce_dds_client] successfully created rt/fmu/out/vehicle_control_mode data writer, topic id: 212
INFO  [uxrce_dds_client] successfully created rt/fmu/out/vehicle_gps_position data writer, topic id: 215
INFO  [uxrce_dds_client] successfully created rt/fmu/out/vehicle_status data writer, topic id: 229
INFO  [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
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  [tone_alarm] notify negative
INFO  [logger] logger started (mode=all)
INFO  [logger] Start file log (type: full)
INFO  [logger] [logger] ./log/2023-10-31/16_49_21.ulg	
INFO  [logger] Opened full log file: ./log/2023-10-31/16_49_21.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> INFO  [mavlink] partner IP: 127.0.0.1
WARN  [health_and_arming_checks] Preflight Fail: ekf2 missing data
WARN  [health_and_arming_checks] Preflight Fail: ekf2 missing data
INFO  [tone_alarm] notify negative
  • TERMINAL 3 running tis example
    ros2 run px4_ros_com offboard_control
    Output:
ros2 run px4_ros_com offboard_control
Starting offboard control node...
[INFO] [1698770981.591611499] [offboard_control]: Arm command send

I am running the v4.2.9 of QGC, I see that my drone goes in Offboard mode but does not takeoff...

Since is simulated I do not think that the problem is related to EKF2 sources, and I do not have any clue about what can it be...

@Sukruthi-C
Copy link

Sukruthi-C commented Feb 16, 2024

I have a similar issue. Were you able to find a way around this?

@sahiedu
Copy link

sahiedu commented Mar 19, 2024

I have the same problem.

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

No branches or pull requests

3 participants