This tutorial will walk you through connecting ROSbot to ROS Development Studio (RDS) cloud service. We will show you, how to setup ROSbot to be controlled remotely with application hosted in cloud.
Step 1: ROSbot configuration
ROSbot configuration is required only once, to proceed with setup, you will need to connect with ROSbot through SSH or remote desktop and issue all commands in terminal.
Clone RDS repository for real robot connection and install dependencies:
mkdir RDS cd RDS git clone https://bitbucket.org/theconstructcore/rosds_real_robot_connection.git cd rosds_real_robot_connection/ ./realrobot_setup.sh rosbot sudo -H python -m pip install npyscreen
We will use Husarion
tutorial_pkg as an example, but you can configure in the same way any other ROS application.
Wa assume that you are working on fresh ROSbot image. If you were following any other Husarion tutorials, then you may have aready installed
husarion_pkg repository, in that case, you can skip this workspace setup.
Prepare workspace and clone repository:
mkdir ~/ros_workspace mkdir ~/ros_workspace/src cd ~/ros_workspace/src catkin_init_workspace git clone https://github.com/husarion/tutorial_pkg.git cd ~/ros_workspace catkin_make echo '. ~/ros_workspace/devel/setup.sh' >> ~/.bashrc . ~/.bashrc
Step 2: Conecting ROSbot to RDS cloud
Below setup is required each time ROSbot is connecting to RDS:
RDS cloud uses Husarnet to provide low-latency, secure connection between cloud environment and physical robot. Husarnet is a P2P Virtual LAN network, so from your ROSbot and RDS environment point of view, they are in the same LAN network. That means you can execute some ROS nodes in the RDS and other ones in the physical robot.
Connect with ROSbot through SSH or remote desktop and issue below commands:
cd ~RDS/rosds_real_robot_connection/ sudo python real_robot_cli_ui.py
- In Device Name field provide
- From *Pick One list choose
( ) ON.
- Field Robot URL will get filled with link, copy it for further use
- Choose OK to Exit
ROSbot is configured to wait for connection form RDS.
It is required to start example application, we will use SLAM and path planning:
roslaunch tutorial_pkg tutorial_7_core.launch
In another terminal execute:
Step 3: Working on RDS
Open ROSject prepared for this turorial.
Open menu Real Robot and choose button Connect to Robot
In dialog menu provide
rosbot in Robot name field and in *Robot URL paste link that you have copied earlier.
When process is finished, you should see menu allowing you to choose master device, select rosbot.
Select Tools -> Shell to open terminal view and launch visualization tools:
roslaunch rosbot_description model_preview.launch
Select Tools -> Graphical Tools
You will see visualization of ROSbot, laser scans and generated map.
Use 2D Nav Goal tool to set robot destination.
You can observe as real ROSbot drives to point selected on map. You may also observe as Lidar scan are changing accordingly to ROSbot position and reflect real obstacles around device.