Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions brain_box_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,30 @@ rosidl_generate_interfaces(${PROJECT_NAME}
msg/VxYaw.msg
msg/ZEDStatus.msg

#psdk msg
"msg/DisplayMode.msg"
"msg/FlightAnomaly.msg"
"msg/GimbalStatus.msg"
"msg/HomePosition.msg"
"msg/PositionFused.msg"
"msg/GPSDetails.msg"
"msg/RelativeObstacleInfo.msg"
"msg/SDKCtrlInfo.msg"
"msg/GimbalRotation.msg"
"msg/RTKYaw.msg"
"msg/FlightStatus.msg"
"msg/RCConnectionStatus.msg"
"msg/ControlMode.msg"
"msg/HmsInfoMsg.msg"
"msg/HmsInfoTable.msg"
"msg/SingleBatteryInfo.msg"
"msg/EscData.msg"
"msg/EscStatusIndividual.msg"
"msg/FileInfo.msg"
"msg/SubFileInfo.msg"
"msg/FileAttributes.msg"
"msg/PerceptionCameraParameters.msg"

#services
srv/AMMapBoundingBoxQuery.srv
srv/AnalyzeSingleImage.srv
Expand All @@ -205,6 +229,42 @@ rosidl_generate_interfaces(${PROJECT_NAME}
srv/VelocityControl.srv
srv/VxFlightPlan.srv
srv/VxMissionExec.srv

#psdk services
"srv/CameraGetFileListInfo.srv"
"srv/CameraGetType.srv"
"srv/CameraSetExposureModeEV.srv"
"srv/CameraGetExposureModeEV.srv"
"srv/CameraSetShutterSpeed.srv"
"srv/CameraGetShutterSpeed.srv"
"srv/CameraSetISO.srv"
"srv/CameraGetISO.srv"
"srv/CameraSetFocusTarget.srv"
"srv/CameraGetFocusTarget.srv"
"srv/CameraSetFocusMode.srv"
"srv/CameraGetFocusMode.srv"
"srv/CameraSetOpticalZoom.srv"
"srv/CameraGetOpticalZoom.srv"
"srv/CameraSetInfraredZoom.srv"
"srv/CameraSetAperture.srv"
"srv/CameraGetAperture.srv"
"srv/CameraShootSinglePhoto.srv"
"srv/CameraShootBurstPhoto.srv"
"srv/CameraShootIntervalPhoto.srv"
"srv/CameraStopShootPhoto.srv"
"srv/CameraRecordVideo.srv"
"srv/CameraGetLaserRangingInfo.srv"
"srv/CameraSetupStreaming.srv"
"srv/CameraFormatSdCard.srv"
"srv/CameraGetSDStorageInfo.srv"
"srv/GimbalSetMode.srv"
"srv/GimbalReset.srv"
"srv/SetHomeFromGPS.srv"
"srv/SetGoHomeAltitude.srv"
"srv/GetGoHomeAltitude.srv"
"srv/SetObstacleAvoidance.srv"
"srv/GetObstacleAvoidance.srv"
"srv/PerceptionStereoVisionSetup.srv"

#actions
action/CheckForObjects.action
Expand All @@ -216,6 +276,10 @@ rosidl_generate_interfaces(${PROJECT_NAME}
action/RTL.action
action/VxFlightExec.action
action/Fibonacci.action

#psdk action
"action/CameraDeleteFileByIndex.action"
"action/CameraDownloadFileByIndex.action"

DEPENDENCIES builtin_interfaces std_msgs geometry_msgs sensor_msgs nav_msgs shape_msgs vision_msgs rcl_interfaces
)
Expand Down
8 changes: 8 additions & 0 deletions brain_box_msgs/action/CameraDeleteFileByIndex.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# goal
uint8 payload_index 1 # see enum E_DjiMountPosition in dji_typedef.h
uint32 file_index
---
# result
bool success
---
# feedback
11 changes: 11 additions & 0 deletions brain_box_msgs/action/CameraDownloadFileByIndex.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# goal
uint8 payload_index 1 # see enum E_DjiMountPosition in dji_typedef.h
uint32 file_index
string file_name
string file_path

---
# result
bool success
---
# feedback
4 changes: 4 additions & 0 deletions brain_box_msgs/msg/ControlMode.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
std_msgs/Header header
uint8 control_mode # The modes in which the aircraft is being controlled (control loops being applied on horizontal, vertical and yaw axes of the aircraft)
uint8 device_mode # 0->RC 1->MSDK 4->PSDK
uint8 control_auth # 1->Has control authority 0->No control authority
49 changes: 49 additions & 0 deletions brain_box_msgs/msg/DisplayMode.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
uint8 DISPLAY_MODE_MANUAL_CTRL = 0
uint8 DISPLAY_MODE_ATTITUDE = 1
uint8 DISPLAY_MODE_RESERVED_2 = 2
uint8 DISPLAY_MODE_RESERVED_3 = 3
uint8 DISPLAY_MODE_RESERVED_4 = 4
uint8 DISPLAY_MODE_RESERVED_5 = 5
uint8 DISPLAY_MODE_P_GPS = 6
uint8 DISPLAY_MODE_RESERVED_7 = 7
uint8 DISPLAY_MODE_RESERVED_8 = 8
uint8 DISPLAY_MODE_HOTPOINT_MODE = 9
uint8 DISPLAY_MODE_ASSISTED_TAKEOFF = 10
uint8 DISPLAY_MODE_AUTO_TAKEOFF = 11
uint8 DISPLAY_MODE_AUTO_LANDING = 12
uint8 DISPLAY_MODE_RESERVED_13 = 13
uint8 DISPLAY_MODE_RESERVED_14 = 14
uint8 DISPLAY_MODE_NAVI_GO_HOME = 15
uint8 DISPLAY_MODE_RESERVED_16 = 16
uint8 DISPLAY_MODE_NAVI_SDK_CTRL = 17
uint8 DISPLAY_MODE_RESERVED_18 = 18
uint8 DISPLAY_MODE_RESERVED_19 = 19
uint8 DISPLAY_MODE_RESERVED_20 = 20
uint8 DISPLAY_MODE_RESERVED_21 = 21
uint8 DISPLAY_MODE_RESERVED_22 = 22
uint8 DISPLAY_MODE_RESERVED_23 = 23
uint8 DISPLAY_MODE_RESERVED_24 = 24
uint8 DISPLAY_MODE_RESERVED_25 = 25
uint8 DISPLAY_MODE_RESERVED_26 = 26
uint8 DISPLAY_MODE_RESERVED_27 = 27
uint8 DISPLAY_MODE_RESERVED_28 = 28
uint8 DISPLAY_MODE_RESERVED_29 = 29
uint8 DISPLAY_MODE_RESERVED_30 = 30
uint8 DISPLAY_MODE_RESERVED_31 = 31
uint8 DISPLAY_MODE_RESERVED_32 = 32
uint8 DISPLAY_MODE_FORCE_AUTO_LANDING = 33
uint8 DISPLAY_MODE_RESERVED_34 = 34
uint8 DISPLAY_MODE_RESERVED_35 = 35
uint8 DISPLAY_MODE_RESERVED_36 = 36
uint8 DISPLAY_MODE_RESERVED_37 = 37
uint8 DISPLAY_MODE_RESERVED_38 = 38
uint8 DISPLAY_MODE_RESERVED_39 = 39
uint8 DISPLAY_MODE_SEARCH_MODE = 40
uint8 DISPLAY_MODE_ENGINE_START = 41
uint8 DISPLAY_MODE_RESERVED_42 = 42
uint8 DISPLAY_MODE_RESERVED_43 = 42



std_msgs/Header header
uint8 display_mode
5 changes: 5 additions & 0 deletions brain_box_msgs/msg/EscData.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


std_msgs/Header header

EscStatusIndividual[] esc # Array of ESC status
9 changes: 9 additions & 0 deletions brain_box_msgs/msg/EscStatusIndividual.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
int16 current # ESC current, unit: mA
int16 speed # ESC speed, unit: rpm
uint16 voltage # Input power from battery to ESC, unit: mV
int16 temperature # ESC temperature, unit: degree C
int16 stall # Motor is stall
int16 empty # Motor has no load
int16 unbalanced # Motor speed is unbalanced
int16 esc_disconnected # ESC is disconnected
int16 temperature_high # Temperature is high
6 changes: 6 additions & 0 deletions brain_box_msgs/msg/FileAttributes.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
uint32 photo_ratio
uint32 photo_rotation
uint32 video_duration
uint32 video_frame_rate
uint32 video_rotation
uint32 video_resolution
8 changes: 8 additions & 0 deletions brain_box_msgs/msg/FileInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
string name
uint8 type
uint32 size
uint32 index
int64 create_time_unix
FileAttributes attributes
uint8 number_sub_files
SubFileInfo[] sub_files
15 changes: 15 additions & 0 deletions brain_box_msgs/msg/FlightAnomaly.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
std_msgs/Header header
uint32 impact_in_air # 0: No impact, 1: _impact happens in Air
uint32 random_fly # 0: Normal, 1: Randomly fly in GPS mode without stick input
uint32 height_ctrl_fail # 0: Height control normal, 1: Height control failed
uint32 roll_pitch_ctrl_fail # 0: Tilt control normal, 1: Tilt control failed
uint32 yaw_ctrl_fail # 0: Yaw control normal, 1: Yaw control failed
uint32 aircraft_is_falling # 0: Aircraft is not falling, 1: Aircraft is falling
uint32 strong_wind_level1 # 0: wind is under big wind level 1, 1: wind is stronger than big wind level 1
uint32 strong_wind_level2 # 0: wind is under big wind level 2, 1: wind is stronger than big wind level 2
uint32 compass_installation_error # 0: Compass install right, 1: Compass install error
uint32 imu_installation_error # 0: IMU install right, 1: IMU install error
uint32 esc_temperature_high # 0: ESC temperature is normal, 1: ESC temperature is high
uint32 at_least_one_esc_disconnected # 0: No ESC disconnected, 1: At least one ESC is disconnected
uint32 gps_yaw_error # 0: No GPS yaw error, 1: GPS yaw error
uint32 reserved
6 changes: 6 additions & 0 deletions brain_box_msgs/msg/FlightStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
uint8 FLIGHT_STATUS_STOPED = 0
uint8 FLIGHT_STATUS_ON_GROUND = 1
uint8 FLIGHT_STATUS_ON_AIR = 2

std_msgs/Header header
uint8 flight_status
19 changes: 19 additions & 0 deletions brain_box_msgs/msg/GPSDetails.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
std_msgs/Header header
float32 horizontal_dop # Horizontal dilution of precision, unit: 0.01, eg: 100 = 1.00, <1: ideal, 1-2: excellent, 2-5: good, 5-10: moderate, 10-20: fair, >20: poor.
float32 position_dop # Position dilution of precision, unit: 0.01, eg: 100 = 1.00, <1: ideal, 1-2: excellent, 2-5: good, 5-10: moderate, 10-20: fair, >20: poor.

uint16 GPS_FIX_STATE_NO_FIX = 0 # GPS position has not been fixed.
uint16 GPS_FIX_STATE_DEAD_RECKONING_ONLY = 1 # GPS position is dead reckoned only.
uint16 GPS_FIX_STATE_2D_FIX = 2 # The horizontal position with latitude/longitude (or northing/easting or X/Y) is fixed.
uint16 GPS_FIX_STATE_3D_FIX = 3 # The horizontal and vertical position with latitude/longitude/altitude (northing/easting/altitude or X/Y/Z) is fixed.
uint16 GPS_FIX_STATE_GPS_PLUS_DEAD_RECKONING = 4 # Position is calculated by GPS and combined with dead reckoning.
uint16 GPS_FIX_STATE_TIME_ONLY_FIX = 5 # Only time is fixed.
float32 fix_state

float32 vertical_accuracy # Vertical position accuracy (mm), the smaller, the better.
float32 horizontal_accuracy # Horizontal position accuracy (mm), the smaller, the better.
float32 speed_accuracy # Speed accuracy (cm/s), the smaller, the better.
uint32 num_gps_satellites_used # Number of GPS satellites used for fixing position.
uint32 num_glonass_satellites_used # Number of GLONASS satellites used for fixing position.
uint16 num_total_satellites_used # Total number of satellites used for fixing position.
uint16 gps_counter # Accumulated times of sending GPS data.
8 changes: 8 additions & 0 deletions brain_box_msgs/msg/GimbalRotation.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
uint8 payload_index 1 # see enum E_DjiMountPosition in dji_typedef.h
uint8 rotation_mode # see E_DjiGimbalRotationMode in dji_gimbal_manager.h 0 /*!< Incremental angle rotation mode, represents rotating gimbal specified angles based on current angles. */
# 1, /*!< Absolute angle rotation mode, represents rotating gimbal to specified angles in the ground coordinate. */
# 2 /*!< Speed rotation mode, specifies rotation speed of gimbal in the ground coordinate. */
float32 pitch # unit: radians
float32 roll # unit: radians
float32 yaw # unit: radians
float32 time # /*!< Expect execution time of gimbal rotation, unit: second. */
18 changes: 18 additions & 0 deletions brain_box_msgs/msg/GimbalStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
std_msgs/Header header
uint32 mount_status # 1 - gimbal mounted, 0 - gimbal not mounted
uint32 is_busy
uint32 pitch_limited # 1 - axis reached limit, 0 - no
uint32 roll_limited # 1 - axis reached limit, 0 - no
uint32 yaw_limited # 1 - axis reached limit, 0 - no
uint32 calibrating # 1 - calibrating, 0 - no
uint32 prev_calibration_result # 1 - success, 0 - fail
uint32 installed_direction # 1 - reversed for OSMO, 0 - normal
uint32 disabled_mvo
uint32 gear_show_unable
uint32 gyro_falut # 1 - fault, 0 - normal
uint32 esc_pitch_status # 1 - Pitch data is normal, 0 - fault
uint32 esc_roll_status # 1 - Roll data is normal, 0 - fault
uint32 esc_yaw_status # 1 - Yaw data is normal , 0 - fault
uint32 drone_data_recv # 1 - normal , 0 - at fault
uint32 init_unfinished # 1 - init complete, 0 - not complete
uint32 fw_updating # 1 - updating, 0 - not updating
10 changes: 10 additions & 0 deletions brain_box_msgs/msg/HmsInfoMsg.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
uint32 error_code # Error code associated to HMS message
uint8 component_index # Related to "payloadId" in the camera module
uint8 error_level
string ground_info # Description of the error code if/when the drone is on the ground
string fly_info # Description of the error code if/when the drone is in the air

uint8 MIN_HMS_ERROR_LEVEL = 0
uint8 MID_HMS_ERROR_LEVEL = 3
uint8 MAX_HMS_ERROR_LEVEL = 6

3 changes: 3 additions & 0 deletions brain_box_msgs/msg/HmsInfoTable.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
uint32 num_msg # Length of 'table' array
HmsInfoMsg[] table # Array of HmsInfoMsg

7 changes: 7 additions & 0 deletions brain_box_msgs/msg/HomePosition.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
uint8 HOME_POSITION_STATUS_FAILED = 0
uint8 HOME_POSITION_STATUS_SUCCESS = 1

std_msgs/Header header
uint8 home_position_status
float64 latitude
float64 longitude
6 changes: 6 additions & 0 deletions brain_box_msgs/msg/PerceptionCameraParameters.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
std_msgs/Header header
uint8 stereo_cameras_direction
float64[9] left_intrinsics
float64[9] right_intrinsics
float64[9] rotation_left_in_right
float64[3] translation_left_in_right
5 changes: 5 additions & 0 deletions brain_box_msgs/msg/PositionFused.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
std_msgs/Header header
geometry_msgs/Point position
uint8 x_health
uint8 y_health
uint8 z_health
5 changes: 5 additions & 0 deletions brain_box_msgs/msg/RCConnectionStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
std_msgs/Header header
uint8 air_connection # Sky side is connected, i.e., receiver is connected to FC
uint8 ground_connection # Ground side is connected, i.e., RC is on and connected to FC
uint8 app_connection # Mobile App is connected to RC
uint8 air_or_ground_disconnected # 0 if sky or ground side is disconnected for 3 seconds
3 changes: 3 additions & 0 deletions brain_box_msgs/msg/RTKYaw.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
std_msgs/Header header
uint16 yaw # unit: deg. The RTK yaw will provide the vector from ANT1 to ANT2 as configured in DJI Assistant 2. This
# means that the value of RTK yaw will be 90deg offset from the yaw of the aircraft.
15 changes: 15 additions & 0 deletions brain_box_msgs/msg/RelativeObstacleInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
std_msgs/Header header

float32 down # distance from obstacle (m)
float32 front # distance from obstacle (m)
float32 right # distance from obstacle (m)
float32 back # distance from obstacle (m)
float32 left # distance from obstacle (m)
float32 up # distance from obstacle (m)
uint8 down_health # Down sensor flag: 0 - not working, 1 - working
uint8 front_health # Front sensor flag: 0 - not working, 1 - working
uint8 right_health # Right sensor flag: 0 - not working, 1 - working
uint8 back_health # Back sensor flag: 0 - not working, 1 - working
uint8 left_health # Left sensor flag: 0 - not working, 1 - working
uint8 up_health # Up sensor health flag: 0 - not working, 1 - working
uint8 reserved # Reserved sensor health flag
6 changes: 6 additions & 0 deletions brain_box_msgs/msg/SDKCtrlInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
std_msgs/Header header
uint8 control_mode # see CtlrMode in dji_status.hpp
uint8 device_status # 0->rc 1->app 4->serial
uint8 flight_status # 1->opensd 0->close
uint8 vrc_status
uint8 reserved
16 changes: 16 additions & 0 deletions brain_box_msgs/msg/SingleBatteryInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
std_msgs/Header header

uint8 battery_index
float32 voltage
float32 current
float32 full_capacity
float32 capacity_remain
float32 capacity_percentage
float32 temperature
uint8 cell_count
uint32 self_check_error
uint32 closed_reason
uint16 abnormal_comm
uint16 is_embed


6 changes: 6 additions & 0 deletions brain_box_msgs/msg/SubFileInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
string name
uint8 type
uint32 size
uint32 index
int64 create_time_unix
FileAttributes attributes
6 changes: 6 additions & 0 deletions brain_box_msgs/srv/CameraFormatSdCard.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#request
uint8 payload_index 1 # see enum E_DjiMountPosition in dji_typedef.h

---
#response
bool success
6 changes: 6 additions & 0 deletions brain_box_msgs/srv/CameraGetAperture.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#request
uint8 payload_index 1 # see enum E_DjiMountPosition in dji_typedef.h
---
#response
bool success
uint16 aperture # see enum E_DjiCameraManagerAperture in dji_camera_manager.h
7 changes: 7 additions & 0 deletions brain_box_msgs/srv/CameraGetExposureModeEV.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#request
uint8 payload_index 1 # see enum E_DjiMountPosition in dji_typedef.h
---
#response
bool success
uint8 exposure_mode # see enum E_DjiCameraManagerExposureMode in dji_camera_manager.h
uint8 ev_factor # ev_factor see enum E_DjiCameraManagerExposureCompensation in dji_camera_manager.h
Loading
Loading