ROSbot - introduction
ROSbot 2.0 is autonomous, open source robot platform. It can be used as a learning platform for Robot Operating System as well as a base for a variety of robotic applications such as research robots, inspection robots, custom service robots etc.
What's in the box:
- carrying case
- ROSbot 2.0 (with optional 3D camera and LiDAR already assembled)
- Wi-Fi 2.4GHz antenna
- 3x 18650 Li-Ion rechargeable batteries
- universal charger with power adapter
- charging cable
- microSD card with the software for ROSbot
- USB to Ethernet adapter
Rear panel description
In the picture below you can see names of the elements from the rear panel of the ROSbot.
1. Mounting the batteries
Your ROSbot is assembled, but to get it ready to work, you need to provide a power supply and attach the antenna.
To mount the batteries turn ROSbot upside down and follow these steps:
- Unscrew battery cover mounted with two screws.
- Remove the battery cover.
- Place batteries accordingly to the polarization symbols (do it carefully!), keeping the black strip under the batteries.
- Place battery cover and mount it with screws.
2. Batteries charging guide
- Connect the power adapter to the charger and the output cable between charger and ROSbot (2 connectors on charger side, 1 black connector to ROSbot charging port).
After this step is complete your charger should look like this:
- Use the first two buttons to select “LiPo BATT” mode and press [Start] button.
- Use arrows to select “LiPo CHARGE” mode.
- Press [Start] - the current value should start blinking. Use arrows to set the current to 1.5A.
- Press [Start] again - the voltage value should start blinking. Select “11.1V(3S)” using arrows.
- Press and hold [Start] for 2 seconds. The charger should now ask for confirmation. Press [Start] again. The charging process should begin now.
- When charging is finished (after about 3 hours), the charger will generate a loud “beep” sound and will finish charging at the same time.
The picture below is a visualization of the mentioned steps.
3. Attaching the antenna
To attach the antenna, screw it to the antenna connector on the ROSbot rear panel.
Connecting to Wi-Fi network and Husarion cloud
Setup Husarion Cloud account to program low-level firmware to your ROSbot.
Connecting using Ethernet adapter
In the ROSbot 2.0 set there is a USB-Ethernet card. Use it for the first setup.
Turn on the robot and wait until it boots.
Plug in Ethernet adapter (included in set) to USB port in the rear panel.
Plug in one end of the Ethernet cable into your computer and other one to the adapter.
Connect with ROSbot via ssh, type in your terminal application:
ssh firstname.lastname@example.org password
Connect to a Wi-Fi network.
- In the terminal type
ifconfig wlan0and press Enter.
iwconfig wlan0 essid MY-WIFI-NETWORK key MY-WIFI-PASSand press Enter.
dhclient wlan0and press Enter to obtain an IP address and connect to the WiFi network.
- In the terminal type
Connect to a Husarion cloud.
- Open https://cloud.husarion.com in your web browser.
- Click Add new button.
- Enter device name and click Next.
- Copy a code under a QR code (it looks like:
- Open Linux terminal and type (including code from the previous step).
sudo husarion-register --code "prod|xxxxxxxxxxxxxxxxxxxxxx"
- After a few seconds you should see your device online at https://cloud.husarion.com.
There are two other ways to connect ROSbot to Husarion cloud: mouse + keyboard or mobile app. If you prefer them, check out this guide: https://husarion.com/tutorials/howtostart/rosbot---quick-start/#connecting-to-the-cloud.
Getting the device IP
Click "+" next to your device name and select "IDE".
Click "More" button to open device details view.
Local IP and note address provided, we will refer to it later as
Programming a firmware
First you will program the ROSbot:
Click "+" next to your device name and select "IDE".
Click "Create" button to open new project wizard.
Select CORE2 board, chose "ROSbot default firmware" project template and enter name, eg. myROSbot, and click "Create project" button.
This is a web Integrated Development Environment in which you can write a firmware for your device, and upload the firmware through the Internet.
<none> (ellipse on image) next to
selected device and select
Click a button with a
cloud with arrow (red square on image) to upload new firmware to your device. Well done! now you can check how your first program works.
In the previous step you have uploaded the firmware into your ROSbot. Let's check how it works!
RoboMaker ROSbot project
We have prepared the repository containing setup files along with ROSbot model and launch files required to use Husarion ROS tutorials on AWS RoboMaker and deploy them to ROSbot with use of Greengrass. Currently, tutorials 6 - SLAM navigation, 7 - Path planning and 8 - Unknown environment exploration are tested, other tutorials will be added soon.
Configure AWS Environment
Before we use AWS RoboMaker to build and deploy the tutorial applications, we must first set up the AWS environment. To simplify the configuration, we will use AWS CloudFormation. CloudFormation enables us to use a template file to define the configuration of our environment. We will use CloudFormation to create a bucket in Amaazon S3, as well as to create the necessary permissions in AWS Identity and Access Manager (IAM) that AWS RoboMaker requires to simulate and deploy our robot applications.
To deploy the template, sign in to the CloudFormation console. Following the following steps to deploy the template:
- Download the template file from here.
- Click the Create Stack button.
- Under Choose a template, choose Upload a template to Amazon S3 and click Choose File.
- Browse to the rosbot_tutorial_template.yaml file you download in Step 1 above.
- Click Next.
- On the next screen, provide a Stack name. This should be something descriptive such as "ROSbot-setup".
- In the S3BucketName field, provide a globally-unique name for the S3 bucket that will be created. This S3 bucket will be used to store your robot application bundles, as well as any logs that your robot may generate during simulation. Use a name unique to you, such as "<user_id>-rosbot-tutorial". Replace "<user-id>" with a unique string.
- Choose Next.
- On the Options page, leave all defaults and choose Next.
- On the Review page, click the checkbox to acknowledge that CloudFormation will create IAM resources on your behalf.
- Click Create.
After a few brief minutes, the stack will be created. When the status has changed to CREATE_COMPLETE, choose the stack you just created, and view its Outputs. You will see 3 key/value pairs. You will use these values later in this guide.
ROSbot setup in RoboMaker
ROSbot need some system modifications before Greengrass will be able to run and deploy applications. To configure ROSbot:
- Sign in to the AWS RoboMaker console.
- In the left navigation pane, choose Fleet Management and then choose Robots.
- Choose *Create robot.
- In the Name field, type
- From the Architecture dropdown menu choose ARMHF.
- From the AWS Greengrass group dropdown menu choose Create new.
- In the AWS Greengrass prefix field type
- In the IAM role select ROSbot-deployment-role.
- Proceed with Create, you will be redirected to Download your Core device page.
Choose Download button next to Download and store your Core's security resources.
You will get
ROSbot-setup.zipfile, it needs to be uploaded to ROSbot. The upload process will vary, depending on your host operating system.
Navigate to directory where the file is downloaded, by default it should be
- Copy the file to your ROSbot, you will need to substitute
ROSBOT_IPwith device address you noted earlier:
scp ROSbot-setup.zip husarion@ROSBOT_IP:ROSbot-setup.zip
You will need an SCP client, download and install WinSCP.
Start WinSCP, you will see the login dialog:
File protocoldropdown menu choose:
Host namefield provide rosbot IP address that you noted earlier, it is the value which we described as
Port numberfield provide
User namefield provide
When all fields are filled up, click
Login button to connect, you will see file manager view.
In the left tab navigate to directory where you downloaded the ROSbot-setup.zip file. In the right tab navigate to
Drag and drop the
ROSbot-setup.zip to the right tab.
When the transfer is finished, close the window.
ROSbot setup on device
You will need to make some system configurations on device. Depending on your host system, you can connect to your ROSbot with different methods:
Open terminal and start
ssh connection, you will need to substitute
ROSBOT_IP with device address you noted earlier:
Proceed to Device setup section.
r then type
You will see a window appear:
Type in your device IP address and click connect.
You will see the ROSbot desktop, from the top menu, choose the
In the terminal execute bellow commands:
- Copy the
setup_ROSbot_for_gg.shfile to your ROSbot and run it as root:
wget https://raw.githubusercontent.com/husarion/rosbot-robomaker/master/setup_ROSbot_for_gg.sh chmod a+x setup_ROSbot_for_gg.sh sudo ./setup_ROSbot_for_gg.sh
- Unzip ROSbot security resources:
cd ~ sudo unzip ROSbot-setup.zip -d /greengrass
- Start the GreenGrass:
sudo /greengrass/ggc/core/greengrassd start
- Leave the ROSbot turned on, it will wait for deployment.
Creating a RoboMaker IDE
Application will be built using the RoboMaker environment. To create the IDE:
- Sign in to the AWS RoboMaker console
- On the left, expand Development, choose Development environments, and then choose Create environment.
- In the Create AWS RoboMaker development environment page, enter
rosbot_envas the environment name.
- Accept the default Instance type (
m4.large). You can select different instances type to improve bundling performance.
- In VPC dropdown list choose the default value.
- In the Subnets dropdown list choose the first subnet. You can select different subnet if necessary.
- Choose Create to create the AWS Cloud9 development environment.
Deploying the application
To deploy application, you will use RoboMaker environment created in previous step:
Go to AWS RoboMaker home console.
On the left, expand Development, choose Development environments, and then choose
Open the development environment with Open environment button.
- In the IDE, go to bash tab and clone the
cd ~/environment/ git clone --recurse-submodules https://github.com/husarion/rosbot-robomaker.git RoboMakerROSbotProject
- Start the configuration script. You need to provide the S3 bucket name and the ARNs of the IAM roles that were created by CloudFormation earlier. The parameters to the script should be set to the corresponding values provided in the output of your CloudFormation stack:
cd ~<S3BucketName> <RoboMakerRole> <ROSbotDeploymentRole>RoboMakerROSbotProject/ ./IDE_setup.bash
The script will install all dependencies, configure project, build and set the deployment job.
When the script is done with its job, you can observe the deployment process:
- Sign in to the AWS RoboMaker console.
- In the left navigation pane, choose Fleet Management and then choose Deployments.
- When new deployment will appear, open it by clicking its name.
- Wait until deployment status changes to Succeed - ROSbot will start to explore environment.
Viewing the results
ROSbots mission, after completing this tutorial, is to autonomously explore the environment around it. It will drive to any location that is accessible and which cannot be observed from the already visited locations. It will create a map of that environment in the process using the data from the A2 LIDAR laser scanner mounted on top of it.
You may observe in real time how ROSbot is building the map. If you’d like to do that connect to ROSbot through a remote desktop client (this could be a
Remote Desktop Connection on Windows or
Remmina on Ubuntu).
Open terminal witm menu
Terminal emulation and execute:
rviz -droboMakerDeploymentPackage install/tutorial_pkg tutorial_pkg tutorial_8.rviz
You will see the Rviz visualization tool with created map and a planned trajectory.
You can see an example map being created on the screenshot below.
Map is considered complete, when there is no traversable gaps within the map boundaries.
When the map is complete, ROSbot will stop and wait for further commands, it is possible to set a destination point on a map using
2D Nav Goal button in Rviz.
by Łukasz Mitka, Husarion
Do you need any support with completing this tutorial or have any difficulties with software or hardware? Feel free to describe your thoughts on our community forum: https://community.husarion.com/ or to contact with our support: email@example.com