forked from chiyu1468/AirTrapMine
(tested)
1. 新增 ros2 接收 SET_POSITION_TARGET_LOCAL_NED 功能, 因應新增 MavPositionTargetGlobalInt.srv 的介面定義檔, 並相應新增使用者的外層包裝 navigation.py 2. 改善 ros2 service 的 response ack 數值對應, 新增 ackEnum.py 3. 改善 longCommand.py 內的呼叫層次, 把 longCommand 相關整合到同樣的 class 下, 僅以 def function 區分內部套用那種 MAV_CMD 4. 新增 example_position_goto.py, example_takeoff_land.py 作為使用範例 ( land.py arm_disarm.py ... 這些下個版本會被刪除) 5. 剩下就是一些註解的修正與更新
This commit is contained in:
@@ -12,6 +12,7 @@ find_package(rosidl_default_generators REQUIRED)
|
||||
rosidl_generate_interfaces(${PROJECT_NAME}
|
||||
"srv/MavPing.srv"
|
||||
"srv/MavCommandLong.srv"
|
||||
"srv/MavPositionTargetGlobalInt.srv"
|
||||
)
|
||||
|
||||
ament_package()
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# Request
|
||||
uint8 target_sysid
|
||||
uint8 target_compid
|
||||
|
||||
uint32 time_boot_ms # ms since system boot, 一般用 0 讓飛控自己填
|
||||
uint8 coordinate_frame # MAV_FRAME_*
|
||||
uint16 type_mask # POSITION_TARGET_TYPEMASK bitmask
|
||||
int32 lat_int # 1e7 * latitude (deg)
|
||||
int32 lon_int # 1e7 * longitude (deg)
|
||||
float32 alt # altitude (m)
|
||||
float32 vx # X velocity (m/s)
|
||||
float32 vy # Y velocity (m/s)
|
||||
float32 vz # Z velocity (m/s)
|
||||
float32 afx # X acceleration or force (m/s^2)
|
||||
float32 afy # Y acceleration or force (m/s^2)
|
||||
float32 afz # Z acceleration or force (m/s^2)
|
||||
float32 yaw # yaw (rad)
|
||||
float32 yaw_rate # yaw rate (rad/s)
|
||||
float32 timeout_sec # 等待 POSITION_TARGET_GLOBAL_INT 回應的時間上限
|
||||
---
|
||||
# Response
|
||||
string message
|
||||
uint8 ack_result
|
||||
uint32 r_time_boot_ms
|
||||
uint16 r_type_mask
|
||||
int32 r_lat_int
|
||||
int32 r_lon_int
|
||||
float32 r_alt
|
||||
float32 r_vx
|
||||
float32 r_vy
|
||||
float32 r_vz
|
||||
float32 r_afx
|
||||
float32 r_afy
|
||||
float32 r_afz
|
||||
float32 r_yaw
|
||||
float32 r_yaw_rate
|
||||
Reference in New Issue
Block a user