SSU-NC-22 / AirPost_Drone

1 stars 0 forks source link

Ros Subscribe correction #1

Closed jsoone24 closed 3 years ago

jsoone24 commented 3 years ago
  1. /mavros/global_position/gp_vel -> /mavros/global_position/raw/gps_vel
  2. in init(self) change parametry self.lon to self.long
  3. in batteryCallback function, change to self.battery = data.voltage
  4. in main function msgs variable, change to mqtt_ros_bridge.long
  5. change subscribe topic /mission/reached to /mavros/mission/reached
jsoone24 commented 3 years ago

Through simulation(SITL), it is checked gps value, velocity, altitude, battery voltage, and waypoint index being gathered correctly. Should change to mode "GUIDED" to takeoff using rosservice takeoff. If want to use battery percentage, should be subscribe /mavros/battery and multiply 100 GPS value from /mavros/global_position/raw/gps_vel is ellipsoid height. So use /mavros/global_position/rel_alt for relative altitude.

jsoone24 commented 3 years ago

useful mavros commands

jsoone24 commented 3 years ago

GCS is receiving information correctly, but not mavros. Mavros topic is not published. To solve. make sure run in terminal "rosservice call /mavros/set_stream_rate 0 10 1"