Skip to content

Make-Sub-Live button #4

Description

@TheDinner22

add a button to the gui that makes the sub live

what does "being live" entail?

  1. starting localiztion (or checking to see that it's started already)
  2. waiting for localization to actually start
  3. resetting localization
  4. 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

  1. 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
  2. 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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions