mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
902 stars 993 forks source link

Different behavior between rosservice call and QGC functionallity #1633

Closed dkati closed 3 years ago

dkati commented 3 years ago

Good evening.

Long story short, when i

rosservice call /mavros/cmd/command "{broadcast: false, command: 192, confirmation: 0, param1: 0.0, param2: 1.0, param3: 0.0,
  param4: 0, param5: 39.433116, param6: 22.795100, param7: 536.0}" 

it works just fine...

Although, when i try to add MAV_CMD_DO_REPOSITION from QGC it says unsupported command.(Can that be from c++ somehow ? of course, i dont mean by calling /mavros/cmd/command programmtically)

All i want to do is, call the MAV_CMD_DO_REPOSITION but also declare the frame of it so it would use the relative altitude and not the ASL one

ubuntu 18LTS Latest mavros installed from upstream (no custom builds or something)

vooon commented 3 years ago

I'm not quite sure what commands QGC supports. You may try to use COMMAND_INT to set frame, but i do not known whether it's supported or not.

dkati commented 3 years ago

oh ok. trying and reporting back

dkati commented 3 years ago

rosservice call /mavros/cmd/command_int "{broadcast: false, frame: 0, command: 192, current: false, autocontinue: false, param1: 0.0, param2: 1.0, param3: 0.0, param4: 1.0, x: 39.4335824, y: 22.7953326, z: 15.0}"

edit: Tried the same with latlong * 1E7 and it now goes to the waypoint but only with ASL.

Seems like it ignores ANY (int) frame i set....sadly

ps. for frames, i use the mavros_msgs::Waypoint enums

enum {
    FRAME_GLOBAL = 0u,
    FRAME_LOCAL_NED = 1u,
    FRAME_MISSION = 2u,
    FRAME_GLOBAL_REL_ALT = 3u,
    FRAME_LOCAL_ENU = 4u,
  };

Edit2: https://github.com/PX4/PX4-Autopilot/issues/8502 Based on this merge, it should have worked with frame:6

dkati commented 3 years ago

seems like that old version of pixhawk (which i and px4 sitl gazebo has), cant support frames for DO_REPOSITION.