Skip to content

Commit

Permalink
Circle E-stop button
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Dec 27, 2024
1 parent 0a3c64f commit 1ab133c
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 19 deletions.
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"orta.vscode-jest",
"bierner.comment-tagged-templates"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
Expand Down
55 changes: 41 additions & 14 deletions demo/panther-layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
"minLevel": 0,
"pinnedIds": [],
"hardwareIdFilter": "",
"topicToRender": "{{env "ROBOT_NAMESPACE"}}/diagnostics",
"topicToRender": "/panther/diagnostics",
"sortByLevel": true
},
"Plot!dg5ynj": {
"paths": [
{
"timestampMethod": "receiveTime",
"value": "{{env "ROBOT_NAMESPACE"}}/imu/data.linear_acceleration.x",
"value": "/panther/imu/data.linear_acceleration.x",
"enabled": true,
"label": "x",
"showLine": true
},
{
"timestampMethod": "receiveTime",
"value": "{{env "ROBOT_NAMESPACE"}}/imu/data.linear_acceleration.y",
"value": "/panther/imu/data.linear_acceleration.y",
"enabled": true,
"label": "y"
},
{
"timestampMethod": "receiveTime",
"value": "{{env "ROBOT_NAMESPACE"}}/imu/data.linear_acceleration.z",
"value": "/panther/imu/data.linear_acceleration.z",
"enabled": true,
"label": "z"
}
Expand All @@ -41,39 +41,57 @@
"followingViewWidth": 60
},
"Bar!3t52ye7": {
"path": "{{env "ROBOT_NAMESPACE"}}/joint_states.effort[0]",
"path": "/panther/joint_states.effort[0]",
"maxValue": 34.52,
"colorMode": "colormap",
"gradient": ["#0000ff", "#ff00ff"],
"reverse": false,
"foxglovePanelTitle": "FL"
},
"Bar!461hl59": {
"path": "{{env "ROBOT_NAMESPACE"}}/joint_states.effort[1]",
"path": "/panther/joint_states.effort[1]",
"maxValue": 34.52,
"colorMode": "colormap",
"gradient": ["#0000ff", "#ff00ff"],
"reverse": true,
"foxglovePanelTitle": "FR"
},
"Bar!1fzrnqw": {
"path": "{{env "ROBOT_NAMESPACE"}}/joint_states.effort[2]",
"path": "/panther/joint_states.effort[2]",
"maxValue": 34.52,
"colorMode": "colormap",
"gradient": ["#0000ff", "#ff00ff"],
"reverse": false,
"foxglovePanelTitle": "RL"
},
"Bar!1q5qffy": {
"path": "{{env "ROBOT_NAMESPACE"}}/joint_states.effort[3]",
"path": "/panther/joint_states.effort[3]",
"maxValue": 34.52,
"colorMode": "colormap",
"gradient": ["#0000ff", "#ff00ff"],
"reverse": true,
"foxglovePanelTitle": "RR"
},
"ToggleSrvButton!2dzr02u": {
"serviceName": "/panther/hardware/motor_power_enable",
"statusTopicName": "/panther/hardware/io_state.motor_on",
"activationText": "Activate Motors",
"activationColor": "#ae5312",
"deactivationText": "Deactivate Motors ",
"deactivationColor": "#826b0e",
"foxglovePanelTitle": "Motor Enable"
},
"ToggleSrvButton!449y0td": {
"serviceName": "/panther/hardware/aux_power_enable",
"statusTopicName": "/panther/hardware/io_state.aux_power",
"activationText": "⚡Enable AUX⚡",
"activationColor": "#0069a6",
"deactivationText": "Disable AUX",
"deactivationColor": "#429900",
"foxglovePanelTitle": "AUX power"
},
"Battery!wppv5y": {
"path": "{{env "ROBOT_NAMESPACE"}}/battery/battery_status.percentage",
"path": "/panther/battery/battery_status.percentage",
"minValue": 0,
"maxValue": 1,
"colorMap": "red-yellow-green",
Expand All @@ -87,13 +105,13 @@
"layout": "vertical",
"advancedView": false,
"serviceName": "",
"goServiceName": "{{env "ROBOT_NAMESPACE"}}/hardware/e_stop_reset",
"stopServiceName": "{{env "ROBOT_NAMESPACE"}}/hardware/e_stop_trigger",
"statusTopicName": "{{env "ROBOT_NAMESPACE"}}/hardware/e_stop.data",
"goServiceName": "/panther/hardware/e_stop_reset",
"stopServiceName": "/panther/hardware/e_stop_trigger",
"statusTopicName": "/panther/hardware/e_stop.data",
"foxglovePanelTitle": "E-stop"
},
"Joy!3fmstz6": {
"topic": "{{env "ROBOT_NAMESPACE"}}/cmd_vel",
"topic": "/panther/cmd_vel",
"publishRate": 5,
"upButton": {
"field": "linear-x",
Expand Down Expand Up @@ -127,7 +145,8 @@
"field": "angular-z",
"limit": 3
},
"stamped": false
"stamped": false,
"advanced": false
},
"Tab!1plmth0": {
"activeTabIdx": 2,
Expand Down Expand Up @@ -155,6 +174,14 @@
},
"direction": "column"
}
},
{
"title": "Services",
"layout": {
"first": "ToggleSrvButton!2dzr02u",
"second": "ToggleSrvButton!449y0td",
"direction": "row"
}
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions packages/studio-base/src/panels/EStop/EStop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,10 @@ function EStopContent(
onClick={eStopClicked}
data-testid="call-service-button"
style={{
minWidth: "150px",
minHeight: "70px",
fontSize: "1.7rem",
borderRadius: "0.3rem",
minWidth: "100px",
minHeight: "100px",
fontSize: "2.2rem",
borderRadius: "50%",
}}
>
{eStopAction?.toUpperCase() ?? "Wait for feedback"}
Expand Down

0 comments on commit 1ab133c

Please sign in to comment.