route_admin_panel
About
The Route admin panel is a web user interface for managing routes of ROS based mobile robots.
It allows to:
- Define destination points
- Save robot position as destination point
- Send destination point to move_base
- Upload custom map
- Set a sequence of destination points
The Route admin panel is built as a Node.js application. On one side it is interfacing with ROS topics, while on another side it presents a frontend for managing robot destinations.
Installation
Install Node.js:
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -sudo apt install -y nodejs
Create workspace and clone dependency repositories, it may happen that you already have it done, in that case, skip this step:
mkdir ~/ros_workspacemkdir ~/ros_workspace/srccd ~/ros_workspace/srccatkin_init_workspace echo '. ~/ros_workspace/devel/setup.sh' >> ~/.bashrc
git clone https://github.com/husarion/husarion_ros.gitgit clone https://github.com/husarion/rosbot_description.git
Clone
repository:
cd ~/ros_workspace/srcgit clone https://github.com/husarion/route_admin_panel.git
Install dependencies:
cd ~/ros_workspace/src/route_admin_panel/nodejsnpm install rosnodejs express socket.io quaternion-to-euler math3d multer yargsnpm install
Build workspace:
cd ~/ros_workspacecatkin_make. ~/ros_workspace/devel/setup.sh
How to use
Panel comes with prepared launch files for
,
,
server and all other required components.
Depending on your ROSbot version, you can start it with:
-
for ROSbot 2.0 with Mbed firmware:
roslaunch route_admin_panel demo_rosbot_mbed_fw.launch -
for ROSbot 2.0 PRO with Mbed firmware:
roslaunch route_admin_panel demo_rosbot_pro_mbed_fw.launch -
for Gazebo simulator:
roslaunch route_admin_panel demo_gazebo.launch -
[deprecated] for ROSbot 2.0 with hFramework:
roslaunch route_admin_panel demo_rosbot.launch -
[deprecated] for ROSbot 2.0 PRO with hFramework:
roslaunch route_admin_panel demo_rosbot_pro.launch
Once all nodes are running, go to web browser and type in address bar:
ROSBOT_IP_ADDRESS:8000
You need to substitute phrase
with IP address of your device.
You should see interface like below:
ROS API
Below are ROS interfaces used by the route admin panel:
Topics
Topic | Message type | Direction | Description |
---|---|---|---|
|
| subscriber | Transform from to frame. |
|
| subscriber | Map converted to grayscale image and compressed in PNG format. |
|
| subscriber | Metadata for map. |
|
| publisher | Current value of map zoom. |
|
| publisher | Currently analyzed path from service. |
Services
Service name | Service type | Role | Description |
---|---|---|---|
|
| client | Get proposed path for given points without sending goal to navigation stack. |
Actions
Action name | Action type | Role | Description |
---|---|---|---|
|
| client | Set destinations for navigation stack. |
Map to image conversion
RAP is using additional node
for conversion from
to
from
package. The
subscribes map as
and publishes it as grayscale image with full resolution or cropped dependeing on current map zoom.
Topic | Message type | Direction | Description |
---|---|---|---|
|
| subscriber | Map source |
|
| subscriber | Current value of map zoom. |
|
| publisher | Metadata for map. |
|
| publisher | Map converted to grayscale image. |
|
| publisher | Map cropped according to zoom and converted to grayscale image. |
Using panel from any network
In case you would like to manage robot destinations outside of local network, you could use Husarnet for secure connection with your robot.
All Husarion devices comes with Husarnet preisntalled, if you are using your own device, install Husarnet according to installation guide.
If you do not have a Husarnet account, create it and log in to Husarnet dashboard.
In Husarnet dashboard, click Create network button, you will get a dialog:
Type
as network name then click Create button.
Go to your device and register it in Husarnet network by executing in terminal:
sudo husarnet websetup
You will get a registration link as a response, open it in web browser:
- In Name for this device provide my-rosbot
- In Add to network dropdown menu choose route_admin_demo
- Check Change device hostname checkbox
- Click Add device to your account button
You will be redirected to network summary view:
Click device name to open its configuration:
Check ROS master checkbox.
Optionally you can also check Make the Web UI public if you want to make panel accessible for anyone knowing device address.
Go back to your device and start panel with the same launch file as for local network.
Once the panel is running, you will notice new button WebUI next to your device address in Husarnet dashboard, use this button to view panel.
Wait! But what about real peer-to-peer connection?
To get access without need to log into any server, you will have to install Husarnet client also on your laptop, procedure is the same as for any other device.
Then register your laptop in Husarnet network the same way as you did with robot.
On laptop open browser and in address bar type:
ia a value that you can find in Husarnet dashboard in device settings.
In the end you will be able to access
from any network using a secure peer-to-peer connection:
Описание
Форк архивированного репозитория Husarion Route Admin Panel
Языки
JavaScript
- HTML
- C++
- CSS
- CMake
- Shell