NESTLab / 2122_MultiDroneIndoorSLAM

Code for 21/22 MQP and DRs on Multi Drone Indoor SLAM
0 stars 0 forks source link

Add Next Meeting Message #48

Closed tylerferrara closed 2 years ago

tylerferrara commented 2 years ago

Created new ROS service /tb3_1/send_next_meeting defined in coms/coms/srv/NextMeeting.srv:

# NextMeeting.srv
string robot_ip
int64[] point
float64 time
---
bool accepted

This will ONLY be called by the parent explorer robot to a child relay robot, within the state machine. Try this out in the terminal!

Open the following in three separate terminals:

make sim-gazebo
make debug-coms
rosservice call /tb3_0/send_next_meeting "robot_ip: '192.168.0.2'
point: [2,4,9]
time: 0.0"

The result (within the debug terminal):

data: "Call to send_next_meeting ros service \"robot_ip: 192.168.0.1 | point: (2, 4, 9)\
  \ | time: 0.0\" [SERVICE SEND_NEXT_MEETING]"
---
data: "Client 192.168.0.2 saw robot 192.168.0.1 ACCEPT the next meeting [NEXT_MEETING]"