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

Drone map position and search radius #691

Open
wants to merge 14 commits into
base: integration
Choose a base branch
from
2 changes: 0 additions & 2 deletions msg/AutonCommand.msg

This file was deleted.

Empty file modified pkg/libmanif-dev.deb
100644 → 100755
Empty file.
25 changes: 24 additions & 1 deletion src/teleoperation/backend/consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def connect(self):
self.ish_thermistor_data = rospy.Subscriber(
"/science_thermistors", ScienceThermistors, self.ish_thermistor_data_callback
)
self.drone_waypoint_sub = rospy.Subscriber("/drone_waypoint", NavSatFix, self.drone_waypoint_callback)
self.ish_heater_state = rospy.Subscriber(
"/science_heater_state", HeaterData, self.ish_heater_state_callback
)
Expand Down Expand Up @@ -595,9 +596,18 @@ def cmd_vel_callback(self, msg):
self.send(text_data=json.dumps({"type": "cmd_vel", "linear_x": msg.linear.x, "angular_z": msg.angular.z}))

def gps_fix_callback(self, msg):
fixed = True
if msg.status.status == -1:
fixed = False
self.send(
text_data=json.dumps(
{"type": "nav_sat_fix", "latitude": msg.latitude, "longitude": msg.longitude, "altitude": msg.altitude}
{
"type": "nav_sat_fix",
"latitude": msg.latitude,
"longitude": msg.longitude,
"altitude": msg.altitude,
"status": fixed,
}
)
)

Expand Down Expand Up @@ -805,6 +815,19 @@ def science_spectral_callback(self, msg):
text_data=json.dumps({"type": "spectral_data", "site": msg.site, "data": msg.data, "error": msg.error})
)

def drone_waypoint_callback(self, msg):
latitude = msg.latitude
longitude = msg.longitude
fixed = True
rospy.logerr(msg.status.status)
if msg.status.status == -1:
fixed = False
self.send(
text_data=json.dumps(
{"type": "drone_waypoint", "latitude": latitude, "longitude": longitude, "status": fixed}
)
)

def download_csv(self, msg):
username = os.getenv("USERNAME", "-1")

Expand Down
Binary file modified src/teleoperation/db.sqlite3
Binary file not shown.
3 changes: 3 additions & 0 deletions src/teleoperation/frontend/public/drone_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/teleoperation/frontend/public/drone_icon_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/teleoperation/frontend/src/components/AutonTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ export default defineComponent({
latitude_deg: 42.293195,
longitude_deg: -83.7096706,
bearing_deg: 0,
altitude: 0
altitude: 0,
status: false
},

teleopEnabledCheck: false,
Expand Down Expand Up @@ -156,6 +157,7 @@ export default defineComponent({
this.odom.latitude_deg = msg.latitude
this.odom.longitude_deg = msg.longitude
this.odom.altitude = msg.altitude
this.odom.status = msg.status
} else if (msg.type == 'auton_tfclient') {
this.odom.bearing_deg = quaternionToMapAngle(msg.rotation)
} else if (msg.type == "center_map") {
Expand Down
Loading