diff --git a/README.md b/README.md index cfda94d..612c71c 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,12 @@ Access the dashboard at: [http://localhost:3000/dashboard](http://localhost:3000/dashboard) (or use the host IP of the machine running the web app). +Connect ros topics (if not running on rover). Run from rover repo, then click connect on Dashboard: + +``` +ros2 run rosbridge_server rosbridge_websocket +``` + ## Docker You can run the dashboard using Docker for easier deployment. diff --git a/src/components/panels/MotorStatusPanel.tsx b/src/components/panels/MotorStatusPanel.tsx index f2f12d7..3fd7388 100644 --- a/src/components/panels/MotorStatusPanel.tsx +++ b/src/components/panels/MotorStatusPanel.tsx @@ -174,8 +174,8 @@ const MotorStatusPanel: React.FC = () => { return ( {label} - {stat ? stat.velocity.toFixed(2) : '-'} - {stat ? `${stat.output_current.toFixed(2)}A` : '-'} + {stat && Number.isFinite(stat.velocity) ? stat.velocity.toFixed(2) : '-'} + {stat && Number.isFinite(stat.output_current) ? `${stat.output_current.toFixed(2)}A` : '-'} {errorStr}