add a button to the gui that makes the sub live
what does "being live" entail?
- starting localiztion (or checking to see that it's started already)
- waiting for localization to actually start
- resetting localization
- starting controller
step 1 starting localization
At testing we usually just run this command in the terminal:
ros2 service call /subjugator_localization/enable std_srvs/srv/Empty
the service name is /subjugator_localization/enable
the service type is std_srvs/srv/Empty
if localization is already started, don't try to start it again!
Also if localization is already started, the Make-Sub-Live feature shouldn't really be available (see the section on resetting at the bottom for more info)
step 2 waiting for localization to start
At the pool, we run ros2 topic echo /odometry/filtered
Find the message type here. It should already be in the typescript message types.
Pretty binary here is it publishing or isn't it? (topic_hz==0 or not equal to 0?)
step 3 resetting localization
Localization usually doesn't start at xyz=0,0,0 so we need to reset it.
At the pool, we usually run ros2 service call /subjugator_localization/reset std_srvs/srv/Empty
service name: /subjugator_localization/reset
service type: std_srvs/srv/Empty
there is no way to tell that this runs just wait ~1 second and you can trust that it has been reset
step 4 start controller
finally start the controller and the sub will be live!!!!
at the pool we run ros2 service call /pid_controller/enable std_srvs/srv/SetBool "{data: true}"
you know the drill :)
state of the sub considerations
- For reasons I won't explain, if localization is started this entire Make-The-Sub-Live routine can't be run. If the
/odometry/filtered topic is publishing, disable the button
- leave the kill button and kill system alone (we want the kill system separate from this feature)
lowk css is optional rn
we will have people figma this you can just worry about the react stuff and the functionality
add a button to the gui that makes the sub live
what does "being live" entail?
step 1 starting localization
At testing we usually just run this command in the terminal:
ros2 service call /subjugator_localization/enable std_srvs/srv/Emptythe service name is
/subjugator_localization/enablethe service type is
std_srvs/srv/Emptystep 2 waiting for localization to start
At the pool, we run
ros2 topic echo /odometry/filteredFind the message type here. It should already be in the typescript message types.
Pretty binary here is it publishing or isn't it? (topic_hz==0 or not equal to 0?)
step 3 resetting localization
Localization usually doesn't start at xyz=0,0,0 so we need to reset it.
At the pool, we usually run
ros2 service call /subjugator_localization/reset std_srvs/srv/Emptyservice name: /subjugator_localization/reset
service type: std_srvs/srv/Empty
step 4 start controller
finally start the controller and the sub will be live!!!!
at the pool we run
ros2 service call /pid_controller/enable std_srvs/srv/SetBool "{data: true}"you know the drill :)
state of the sub considerations
/odometry/filteredtopic is publishing, disable the buttonlowk css is optional rn
we will have people figma this you can just worry about the react stuff and the functionality