Skip to content

An example project for controlling a ros system through Next.js, a react based node.js framework.

License

Notifications You must be signed in to change notification settings

LTU-AutoEV/NextJS-ROS-Control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NextJS-ROS-Control

Quickstart

Install Node and rosbridge

curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo apt-get install nodejs ros-<rosdistro>-rosbridge-suite

Install package and dependencies

git clone https://github.com/LTU-AutoEV/NextJS-ROS-Control.git
cd NextJS-ROS-Control
npm install

Running

Launch rosbridge


roslaunch rosbridge_server rosbridge_websocket.launch

Launch the server (development mode)

npm run dev

Open localhost:3000

Running

Debug build (auto-updating):

npm run dev

Optimized build:

npm run build
npm run start

Updating Packages

This repo has versioned packages in package.json. These version are guaranteed to work together, but they may be outdated. Up update everything to latest, run npm update.

Example

To view a ros topic on the page, edit the TopicDisplay in the pages/index.js file.

For Example, to subscribe to a std_msgs::String topic on /chatter, change the line to:

<TopicDisplay name="Chatter: " topic="/chatter" type="std_msgs/String" />

To test, run the following command:

rostopic pub -r 1 /chatter std_msgs/String "Hello world!"

About

An example project for controlling a ros system through Next.js, a react based node.js framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published