[ROS Tutorials] TensorFlow Image Recognition in 5 Steps with ROS Development Studio

[ROS Tutorials] TensorFlow Image Recognition in 5 Steps with ROS Development Studio

 

In this tutorial, you’ll learn how to train a Tensorflow model for image recognition in 5 simple steps using ROS Development Studio(RDS).

Access the ROS Deep Learning with TensorFlow 101 Course here
Access ROS Development Studio

You only need the raw basic files and the rest is automatically generated for you. Classify the Images with ImageLabel
See the training progress with inbuild Tensorboard

Git with sample image and models:
https://bitbucket.org/theconstructcore/course_tflow_image_student_data

 

Step 1. Create a project on RDS

After logging in RDS, click on Create New Project. If you haven’t had an account yet, you can create a free account with this link.

Step 2. Prepare model and training config file

This project is all about AI, we’ll put all the file we need into the au_ws. In this tutorial, we’ll show you this process with an already prepared for convenience. If you want, you can always generate the file you need by yourself. Let’s get started by moving into the directory and clone the project files.

$ cd ~/ai_ws
$ git clone https://bitbucket.org/theconstructcore/course_tflow_image_student_data.git

You can configure training settings with a .config file. Take ssd_mobilenet_v1_coco.config as an example, you can change the batch size here to make the training much faster. With a free account, you’ll have limited computational power and time in RDS which makes it very hard to run a long training session. If you need more computational power and time to train with a larger model with a larger batch size, please check our paid program.

We’ll only keep the files we need and delete the others.

$ mv course_tflow_image_student_data/images_1_labels/ ./
$ mv course_tflow_image_student_data/images_racoon/ ./
$ mv course_tflow_image_student_data/tf_models/ ./
$ rm -rf course_tflow_image_student_data/

 

Step 3. Labeling

To train a deep learning model, you need to label the data first. In the project you just cloned, you can find the labeled image. You can also label your own image with the labeling tool in RDS. To use it, type in the shell

$ labelImg

then open the graphical tool, you can find it under the tools tab. If the command is not working, you can also download the tool from here.

You can draw bounding boxes and generate labeling for images with this tool.

Step 4. Training

Now you have all the files you need to train your model(labeled images, model, config file)! We created a tool in RDS to make the process even easier. Please go to tools -> start tensorflow image learning and select the files you’ve prepared. Then the training starts automatically and you can visualize it with the tensorboard tool! You can see the loss is reducing over time.

Step 5. Run the trained model

After the training is done, you can click tools -> stop image learning… to export frozen_graph file to the ai_ws. With this file, you can run the model and perform image recognition on the images.

If you are interested in this topic, please check our courses on robotic ignite academy for more information.

 

 

Edit by Tony Huang

[ROS Q&A] 110 – How to launch two drones on a Single Gazebo Simulation

We show you how you can launch two drones (or more) in the same Gazebo simulation, each one having its own independent control system based on ROS. This procedure can be replicated to launch as many drones as required.

RELATED LINKS

– How to start programming drones with ROS: https://youtu.be/f7b5tSZW1Ig
– Hector Quadrotor Simulation: https://bitbucket.org/theconstructcore/hector_quadrotor_sim
– ROS Development Studio: https://goo.gl/Yf2Q4J

[irp posts=”6638″ name=”ROS Q&A | How to Start Programming Drones using ROS”]

 

***


programming-drone-with-ros-course-banner

[ROS Q&A] 109 – How to create a custom ROS service message. BB-8 Gazebo Simulator

[ROS Q&A] 109 – How to create a custom ROS service message. BB-8 Gazebo Simulator

 

This video shows step by step how to build your own custom ROS service message, and how to use it in your own service.

For this example we will create a service that measures the amount of distance that the BB8 robot has moved. The service that we will provide is able to measure the amount of distance moved and provide that data either in meters or in miles, depending on how the request is done.

[ROS Courses used BB-8 Gazebo Simulator]
– ROS BASICS IN 5 DAYS (Python) For Beginners: https://www.theconstruct.ai/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/ros-basics-in-5-days/
– ROS BASICS IN 5 DAYS (C++) For Beginners: https://www.theconstruct.ai/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/ros-courses-ros-basics-in-5-days-c/

[ROS Q&A] 108 – Visualize inflation layer in RViz

[ROS Q&A] 108 – Visualize inflation layer in RViz

 

In this video, we show how to visualize the inflation layer in RViz for ROS (Robot Operating System) Navigation.

Step 1. Create a project in ROS Development Studio(ROSDS)

ROSDS helps you follow our tutorial in a fast pace without dealing without setting up an environment locally. If you haven’t had an account yet, you can create a free account here. Let’s call the project inflation_radius.

Step 2. Clone the simulation

Please clone the husky simulation into the simulation_ws

cd ~/simulation_ws/src
git clone https://bitbucket.org/theconstructcore/husky.git
cd ..
catkin_make
source devel/setup.bash

Then we launch the simulation from Simulations->select launch file->main.launch

You should see the husky robot appear in a room.

We also need to launch the navigation stack with the following command

roslaunch husky_navigation move_base_demo.launch

This launch file will launch the AMCL and movebase package.

Step 3. Visualize the inflation layer

We can visualize the navigation with the Rviz tool with the following command

rosrun rviz rviz

Then we have to open the graphical tool from Tools->geaphical tool. We click add to add Robot model and map in the visualization. In the map visualization, please change the map to global cost map and the color scheme to cost map.

To configure the radius of inflation layer, you have to change the inflation_radius value in the husky_navigation/config/costmap_common.yaml file. You can make the layer small by reducing the value here.

Want to learn more?

If you are interested in this topic, please check our ROS navigation in 5 days course for more information.

 

Edit by: Tony Huang

[ROS Q&A] 107 – Understand Complex Launch Files with RQT

[ROS Q&A] 107 – Understand Complex Launch Files with RQT

 

Sometimes, your ROS project contains a huge list of launch files that you can barely understand. One launch file launches 3 others, and those launch 4 more, each one with many parameters, arguments and remaps.

In this video, we show you how to quickly understand complex launch files by using RQT (rqt_gui) with a special plugin. We show how to install the plugin and how to use it to analyze the quite strange launch configuration of the Turtlebot simulation.

Pin It on Pinterest