+
Skip to content

uf-mil/mil-gui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SubjuGator GUI

running the gui

npm install

install dependancies
npm install react-scripts@5.0.1

npm start :)

install ros bridge

sudo apt install ros-jazzy-rosbridge-suite -y

running ros bridge

ros2 launch rosbridge_server rosbridge_websocket_launch.xml

custom hooks

The useRos hook manages the WebSocket (re)connection in the background.

example usage

import { useRos } from './RosContext';

...

// inside your component
const { ros, connected } = useRos()

// Use the ros variable the same way you would if it were defined with:
// const ros = new ROSLIB.Ros({})
topicRef.current = new ROSLIB.Topic({
    ros: ros,
    name: '/hi_adam',
    messageType: 'std_msgs/String'
});

// The connected variable is basically just useState of the websocket's connection status
const msg_status = connected ? "connected" : "not connected";
return ( <div> {msg_status} </div>)

About

A React App which runs on the sub.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载