BB.LiveView (bb_liveview v0.2.4)
View SourceInteractive LiveView-based dashboard for Beam Bots-powered robots.
BB.LiveView provides a self-contained dashboard that can be mounted into any Phoenix application with a single router macro.
Quick Start
Add
bb_liveviewto your dependencies inmix.exs:def deps do [ {:bb_liveview, "~> 0.1"} ] endMount the dashboard in your router:
import BB.LiveView.Router scope "/" do pipe_through :browser bb_dashboard "/robot", robot: MyRobot endVisit
/robotin your browser.
Features
The dashboard provides:
- Safety Controls: Arm/disarm the robot with real-time status
- Joint Control: Slider controls for all movable joints
- Event Stream: Real-time PubSub message monitoring
- Command Execution: Execute robot commands with dynamic forms
- 3D Visualisation: Interactive Three.js robot viewer
- Parameters: Edit robot parameters with type-aware inputs
Multiple Robots
You can mount multiple dashboards for different robots:
bb_dashboard "/arm", robot: ArmRobot
bb_dashboard "/base", robot: BaseRobotAuthentication
Protect the dashboard using standard Phoenix pipelines:
pipeline :admin do
plug MyApp.RequireAdmin
end
scope "/admin" do
pipe_through [:browser, :admin]
bb_dashboard "/robot", robot: MyRobot
end