Skip to main content

ROSDS Virtual robot controlled from your local PC

NOTE: You can run the following project only in a virtual environment do it, by clicking on the ROSDS button

run-on-ROSDS

About

In this ROSject we will show you how to control a virtual robot operating in the ROS Development Studio environmet from a level of your laptop running ROS.

theme

To control a robot the Route Admin Planner provided by Husarion is used. 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.

In this project you will find a simulation of ROSbot 2.0 controlled by Route Admin Panel. With it you will be able to controll virtual robot (not only ROSbot). If you can make it work in this ROSject, you will definetly be able to do it in the real robot.

Establish the connection from your PC side

You need to have connection from ROS Development Studio to your computer for doing it follow instructions

On your computer open new terminal and paste following commands:

git clone https://bitbucket.org/theconstructcore/rosds_real_robot_connection.git
cd rosds_real_robot_connection
sudo ./realrobot_setup.sh
sudo reboot

Once your computer finished rebooting open new terminal and type:

whoami โ€“> It will give you the user_name_in_device. <-- remember this result we will use it later

Open web browser tab for seting up connection.

Type in the URL: localhost:3000

Now you have to click on Turn ON. This will generate the Robot URL that you need to make the connection in ROSDS.

rosds_rap_connection_web1

Establish the connection from ROSDS side

Open ROSject if you don't have, do it using button on the top of the site.

You have to click the RealRobot tab -> Connect to Robot -> ON, and after a few minutes, you will be greeted with the configuration window

Once window pop up place in the corresponding form the PC URL (generated in previous step) and the Robot Name (computer name).

rosds_rap_connection_name

Test that everything is working

On your computer open terminal and test connection using ping6 command:

ping6 rosdscomputer 

If it's working you can launch simulation.

Launch simulation

In the RealRobot tab assign rosmaster to rosdscomputer.

rosds_rap_connection_rosmaster

To start simulation, go to "Simulations" menu, then choose Choose launch file... -> rosbot_launch -> route_admin_planner.launch .

rosds_rap_launch

After simulation starts properly open new tap in web browser and paste following url:

http://rosdscomputer:8000/

You should see webui to add new goal click Add target chose point on map, name point and click >>. To make robot follow route add more points and click set route

rosds_rap_webui

NOTE: If you can't see any map add target close to robot to move it a litte.

Other devices

You can run this to controll real robot, to do, so follow this tutorial:

Route Admin Planner


by Adam Krawczyk, Husarion

Do you need any support with completing this project or have any difficulties? Feel free to describe your thoughts on our community forum: https://community.husarion.com/ or to contact with our support: support@husarion.com