Следите за новостями GitVerse в нашем телеграм-канале

route_admin_panel

Форк
0
Форк от new_products_lab/route_admin_panel

README.md

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_workspace
mkdir ~/ros_workspace/src
cd ~/ros_workspace/src
catkin_init_workspace
echo '. ~/ros_workspace/devel/setup.sh' >> ~/.bashrc
git clone https://github.com/husarion/husarion_ros.git
git clone https://github.com/husarion/rosbot_description.git

Clone

route_admin_panel
repository:

cd ~/ros_workspace/src
git clone https://github.com/husarion/route_admin_panel.git

Install dependencies:

cd ~/ros_workspace/src/route_admin_panel/nodejs
npm install rosnodejs express socket.io quaternion-to-euler math3d multer yargs
npm install

Build workspace:

cd ~/ros_workspace
catkin_make
. ~/ros_workspace/devel/setup.sh

How to use

Panel comes with prepared launch files for

move_base
,
gmapping
,
node.js
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

ROSBOT_IP_ADDRESS
with IP address of your device.

You should see interface like below:

RouteAdminPanelScreenshot

ROS API

Below are ROS interfaces used by the route admin panel:

Topics

TopicMessage typeDirection            Description        
/tf
tf2_msgs/TFMessage
subscriberTransform from
map
to
base_link
frame.
/map_image/full/compressed
sensor_msgs/CompressedImage
subscriberMap converted to grayscale image and compressed in PNG format.
/map_metadata
nav_msgs/MapMetaData
subscriberMetadata for map.
/map_zoom
std_msgs/Int16
publisherCurrent value of map zoom.
/plan
nav_msgs/Path
publisherCurrently analyzed path from
make_plan
service.

Services

Service nameService typeRole            Description        
/move_base/make_plan
nav_msgs_service/GetPlan
clientGet proposed path for given points without sending goal to navigation stack.

Actions

Action nameAction typeRole            Description        
/move_base
move_base_msgs/MoveBase
clientSet destinations for navigation stack.

Map to image conversion

RAP is using additional node

map_to_img_node
for conversion from
nav_msgs/OccupancyGrid
to
sensor_msgs/CompressedImage
from
husarion_ros
package
. The
map_to_img_node
subscribes map as
nav_msgs/OccupancyGrid
and publishes it as grayscale image with full resolution or cropped dependeing on current map zoom.

TopicMessage typeDirection            Description        
/map
nav_msgs/OccupancyGrid
subscriberMap source
/map_zoom
std_msgs/Int16
subscriberCurrent value of map zoom.
/map_metadata
nav_msgs/MapMetaData
publisherMetadata for map.
/map_image/full
sensor_msgs/Image
publisherMap converted to grayscale image.
/map_image/tile
sensor_msgs/Image
publisherMap 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:

create network

Type

route_admin_demo
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:

add device

  • 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:

network summary

Click device name to open its configuration:

network member

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.

web ui accessible

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:

[ROSBOT_HUSARNET_ADDRESS]:8000
ROSBOT_HUSARNET_ADDRESS
ia a value that you can find in Husarnet dashboard in device settings.

In the end you will be able to access

route_admin_panel
from any network using a secure peer-to-peer connection:

panel accessed through husarnet

Описание

Форк архивированного репозитория Husarion Route Admin Panel

Языки

JavaScript

  • HTML
  • C++
  • CSS
  • CMake
  • Shell
Сообщить о нарушении

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.