Exploring ROS with a 2 Wheeled Robot #3 : URDF of a Laser Scan

Exploring ROS with a 2 Wheeled Robot #3 : URDF of a Laser Scan

Hello ROS Developers!

In this post, we start summarizing our YouTube video series called “Exploring ROS with a 2 wheeled Robot”. That’s the part #03 and we hope to help you learning this amazing content by another media, our blog posts. Let’s start!

In the last post, we worked a while with XACROs, in order to simplify our robot model. And now we are going to attach a Laser Scan sensor to our model!

If you don’t have a ROSJect with the previous tutorial, just make a copy of this one, which is the source we are about to start from. Let’s go!

The first modification we’ll do goes to the file ~/simulation_ws/src/m2wr_description/urdf/m2wr.xacro, just after the chassis link (should be at line 54)

  <link name="sensor_laser">
    <inertial>
        <origin xyz="0 0 0" rpy="0 0 0" />
        <mass value="1" />
        <xacro:cylinder_inertia mass="1" r="0.05" l="0.1" />
    </inertial>

    <visual>
        <origin xyz="0 0 0" rpy="0 0 0" />
        <geometry>
        <cylinder radius="0.05" length="0.1"/>
        </geometry>
        <material name="white" />
    </visual>

    <collision>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
        <cylinder radius="0.05" length="0.1"/>
        </geometry>
    </collision>
    </link>

    <joint name="joint_sensor_laser" type="fixed">
    <origin xyz="0.15 0 0.05" rpy="0 0 0"/>
    <parent link="link_chassis"/>
    <child link="sensor_laser"/>
  </joint>

Check that we have a new macro being called, a function for generatin cylinder description for URDF. We have added a new link, to represent the laser scan, as every link, it contains inertial, visual and collision attributes. Finally, a joint to bind it to the root link, the chassis.

In order to have it working, let’s go to the second file: ~/simulation_ws/src/m2wr_description/urdf/macros.xacro. At line 36, lets add the following code (to describe our cylinder macro):

<macro name="cylinder_inertia" params="mass r l">
  <inertia  ixx="${mass*(3*r*r+l*l)/12}" ixy = "0" ixz = "0"
            iyy="${mass*(3*r*r+l*l)/12}" iyz = "0"
            izz="${mass*(r*r)/2}" />
</macro>

Let’s check it in RViz!

Go to a web shell and execute:

user:~$ roslaunch m2wr_description rviz.launch

Open the graphical tools, you must have something like this:

So we have a white part on the robot that represents a laser scan!

Now.. Let’s make it a REAL laser scan (in the simulation, I mean =D )

Go to the last file we are going to modify: ~/simulation_ws/src/m2wr_description/urdf/m2wr.gazebo

Place the code below just after the closing tag of the diff_drive plugin:

  <gazebo reference="sensor_laser">
    <sensor type="ray" name="head_hokuyo_sensor">
      <pose>0 0 0 0 0 0</pose>
      <visualize>false</visualize>
      <update_rate>20</update_rate>
      <ray>
        <scan>
          <horizontal>
            <samples>720</samples>
            <resolution>1</resolution>
            <min_angle>-1.570796</min_angle>
            <max_angle>1.570796</max_angle>
          </horizontal>
        </scan>
        <range>
          <min>0.10</min>
          <max>10.0</max>
          <resolution>0.01</resolution>
        </range>
        <noise>
          <type>gaussian</type>
          <mean>0.0</mean>
          <stddev>0.01</stddev>
        </noise>
      </ray>
      <plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_laser.so">
        <topicName>/m2wr/laser/scan</topicName>
        <frameName>sensor_laser</frameName>
      </plugin>
    </sensor>
  </gazebo>

Take a look at the code. Notice that we are describer there the frameName and topicName. They are important in order to visualize it in RViz and, of course, program the robot.

Other important attributes you can tune for your application are: rangescan and update_rate. Feel free to explore it. Don’t miss the official documentation from gazebo!

Great, let’s launch a simulation with the robot and its Real Laser Scan! I’ll start a world of my choice, the one barrels, so I can check the laser readings easily. You can play with other worlds further. Go to the simulations tab and choose one:

Now, spawn the robot from the terminal:

user:~$ roslaunch m2wr_description spawn.launch

And check the robot there:

You can “echo” the topic /m2wr/laser/scan to check data coming from the laser. Of course it won’t make much sense in the terminal. So let’s check in RViz. Once more to the terminal, run:

user:~$ roslaunch m2wr_description rviz.launch

Configure RViz to visualize the RobotModel and the LaserScan (check the following image):

In order to compare, let’s check the robot and world obstacles in gazebo:

Amazing! Isn’t it?

Don’t forget to leave a comment, ask for help your suggest your ideas!

If something went wrong in your ROSJect during the post reading, you can copy mine by clicking here, it’s ready to use!

In the next post, we will start using the data from the LaserScan. Let’s make the robot navigate around the world!

 

Cheers!

Exploring ROS with a 2 Wheeled Robot #2: URDF Macros (XACRO)

Exploring ROS with a 2 Wheeled Robot #2: URDF Macros (XACRO)

XACROs

In this tutorial, we are going to explore the macros for URDF files, using XACRO files. At the end of this tutorial, we will have the same model organized in different files, in an organized way.

STEP 1

With the first part done we have a simple robot description working. Now.. Let’s organize the different parts of the robot in many files. We are going to do that using XACRO.

We started already creating a .xacro file, but we haven’t used the functions XACRO provides. This is what we are going to achieve to the end of this post.

First step: we are not going to only READ the robot description file, instead we’ll CONVERT the .xacro file into a .urdf using python command

in our launch file. Beginning from ~/simulation_ws/src/m2wr_description/rviz.launch, we have to replace line number 4:

From
<param name="robot_description" command="cat '$(find m2wr_description)/urdf/m2wr.xacro'"/>

to

<param name="robot_description" command="$(find xacro)/xacro.py '$(find m2wr_description)/urdf/m2wr.xacro'"/>

You can launch RViz and load the model as usual. The only difference is in the backgrounds, we are rendering URDF model from xacro commands.

Do the same for ~/simulation_ws/src/m2wr_description/spawn.launchline number 4.

So.. what now? I have URDF being rendered by xacro commands. Let’s split our robot model into different files!

STEP 2

I’ll start creating a new file called ~/simulation_ws/src/m2wr_description/urdf/materials.xacro. Let’s cut and paste the following code from m2wr.xacro to materials.xacro

From m2wr.xacro, cut it:

<material name="black">
    <color rgba="0.0 0.0 0.0 1.0"/>
  </material>
  <material name="blue">
    <color rgba="0.203125 0.23828125 0.28515625 1.0"/>
  </material>
  <material name="green">
    <color rgba="0.0 0.8 0.0 1.0"/>
  </material>
  <material name="grey">
    <color rgba="0.2 0.2 0.2 1.0"/>
  </material>
  <material name="orange">
    <color rgba="1.0 0.423529411765 0.0392156862745 1.0"/>
  </material>
  <material name="brown">
    <color rgba="0.870588235294 0.811764705882 0.764705882353 1.0"/>
  </material>
  <material name="red">
    <color rgba="0.80078125 0.12890625 0.1328125 1.0"/>
  </material>
  <material name="white">
    <color rgba="1.0 1.0 1.0 1.0"/>
  </material>

And create a new file materials.xacro, beginning with XML definition of file and a <robot> tag:

<?xml version="1.0" ?>
<robot>
  <material name="black">
    <color rgba="0.0 0.0 0.0 1.0"/>
  </material>
  <material name="blue">
    <color rgba="0.203125 0.23828125 0.28515625 1.0"/>
  </material>
  <material name="green">
    <color rgba="0.0 0.8 0.0 1.0"/>
  </material>
  <material name="grey">
    <color rgba="0.2 0.2 0.2 1.0"/>
  </material>
  <material name="orange">
    <color rgba="1.0 0.423529411765 0.0392156862745 1.0"/>
  </material>
  <material name="brown">
    <color rgba="0.870588235294 0.811764705882 0.764705882353 1.0"/>
  </material>
  <material name="red">
    <color rgba="0.80078125 0.12890625 0.1328125 1.0"/>
  </material>
  <material name="white">
    <color rgba="1.0 1.0 1.0 1.0"/>
  </material>
</robot>

Great!

STEP 3

Let’s create one more file to handle gazebo stuff. It’s gonna be called: m2wr.gazebo and contains all gazebo properties we current have just below the include of materials.xacro. Our file ~/simulation_ws/src/m2wr_description/urdf/m2wr.gazebo is gonna be like:

<?xml version="1.0" ?>
<robot>
  <gazebo reference="link_chassis">
    <material>Gazebo/Orange</material>
  </gazebo>
  <gazebo reference="link_left_wheel">
    <material>Gazebo/Blue</material>
  </gazebo>
  <gazebo reference="link_right_wheel">
    <material>Gazebo/Blue</material>
  </gazebo>

  <gazebo>
    <plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
      <legacyMode>false</legacyMode>
      <alwaysOn>true</alwaysOn>
      <updateRate>20</updateRate>
      <leftJoint>joint_left_wheel</leftJoint>
      <rightJoint>joint_right_wheel</rightJoint>
      <wheelSeparation>0.2</wheelSeparation>
      <wheelDiameter>0.2</wheelDiameter>
      <torque>0.1</torque>
      <commandTopic>cmd_vel</commandTopic>
      <odometryTopic>odom</odometryTopic>
      <odometryFrame>odom</odometryFrame>
      <robotBaseFrame>link_chassis</robotBaseFrame>
    </plugin>
  </gazebo>
</robot>

STEP 4

Great! Let’s create one more file, in order to simplify the way we are defining the wheels of our robot!

Create a new file ~/simulation_ws/src/m2wr_description/urdf/macros.xacro. And fasten your seat belt because this part will contain some tricks and formulas to make things more dynamic!

Why is that? The robots has 2 wheels, the description of both of them are the same, except for their names and direction. We are going to create a MACRO that fills these properties (for joints and links) according to arguments we are going to pass from m2wr.xacro to macros.xacro.

Our macros.xacro will be like:

<?xml version="1.0"?>
<robot>
    <macro name="link_wheel" params="name">
        <link name="${name}">
            <inertial>
              <mass value="0.2"/>
              <origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
              <inertia ixx="0.000526666666667" ixy="0" ixz="0" iyy="0.000526666666667" iyz="0" izz="0.001"/>
            </inertial>
            <collision name="link_right_wheel_collision">
              <origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
              <geometry>
                <cylinder length="0.04" radius="0.1"/>
              </geometry>
            </collision>
            <visual name="${name}_visual">
              <origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
              <geometry>
                <cylinder length="0.04" radius="0.1"/>
              </geometry>
            </visual>
        </link>
    </macro>

    <macro name="joint_wheel" params="name child origin_xyz">
      <joint name="${name}" type="continuous">
        <origin rpy="0 0 0" xyz="${origin_xyz}"/>
        <child link="${child}"/>
        <parent link="link_chassis"/>
        <axis rpy="0 0 0" xyz="0 1 0"/>
        <limit effort="10000" velocity="1000"/>
        <joint_properties damping="1.0" friction="1.0"/>
      </joint>
    </macro>
</robot>

STEP 5

Finally, our main file m2wr.xacro will be summarized to this:

<?xml version="1.0" ?>
<robot name="m2wr" xmlns:xacro="http://www.ros.org/wiki/xacro">

  <xacro:include filename="$(find m2wr_description)/urdf/materials.xacro" />
  <xacro:include filename="$(find m2wr_description)/urdf/m2wr.gazebo" />
  <xacro:include filename="$(find m2wr_description)/urdf/macros.xacro" />

  <link name="link_chassis">
    <!-- pose and inertial -->
    <pose>0 0 0.1 0 0 0</pose>
    <inertial>
      <mass value="5"/>
      <origin rpy="0 0 0" xyz="0 0 0.1"/>
      <inertia ixx="0.0395416666667" ixy="0" ixz="0" iyy="0.106208333333" iyz="0" izz="0.106208333333"/>
    </inertial>
    <!-- body -->
    <collision name="collision_chassis">
      <geometry>
        <box size="0.5 0.3 0.07"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="0.5 0.3 0.07"/>
      </geometry>
      <material name="blue"/>
    </visual>
    <!-- caster front -->
    <collision name="caster_front_collision">
      <origin rpy=" 0 0 0" xyz="0.35 0 -0.05"/>
      <geometry>
        <sphere radius="0.05"/>
      </geometry>
      <surface>
        <friction>
          <ode>
            <mu>0</mu>
            <mu2>0</mu2>
            <slip1>1.0</slip1>
            <slip2>1.0</slip2>
          </ode>
        </friction>
      </surface>
    </collision>
    <visual name="caster_front_visual">
      <origin rpy=" 0 0 0" xyz="0.2 0 -0.05"/>
      <geometry>
        <sphere radius="0.05"/>
      </geometry>
    </visual>
  </link>

  <xacro:link_wheel name="link_right_wheel" />
  <xacro:joint_wheel name="joint_right_wheel" child="link_right_wheel" origin_xyz="-0.05 0.15 0" />

  <xacro:link_wheel name="link_left_wheel" />
  <xacro:joint_wheel name="joint_left_wheel" child="link_left_wheel" origin_xyz="-0.05 -0.15 0" />
</robot>

We didn’t create a macro for the link link_chassis because we would have the almost the same amount of code, after all we have a single piece using that description. Of course, you can put it into a different file, in order to have your main description file having only includes of different pieces.

At this point, you must be able to launch an empty simulation and spawn the robot. The same applies to visualize the robot in RViz. We don’t have anything different in the results, but a much better to maintain code!

If you didn’t reach this point, you can copy the original project using this link: http://www.rosject.io/l/90f1026/

In this next tutorial, we’re going to insert a laser scan sensor to the robot.

[irp posts=”13043″ name=”Exploring ROS with a 2 Wheeled Robot #3 : URDF of a Laser Scan”]

Don’t forget! If you like this kind of post, participate! Comment or share it! Let us know your opinion!

Cheers!

Related courses:

Exploring ROS using a 2 Wheeled Robot #1: Basics of Robot Modeling using URDF

Exploring ROS using a 2 Wheeled Robot #1: Basics of Robot Modeling using URDF

Explore the basics of robot modeling using the URDF

In this tutorial, we’re going to explore the basics of robot modeling using the Unified Robot Description Format (URDF). At the end of this tutorial, we will have a model ready and running in Gazebo simulator. Let’s start!

STEP 1

First of all, this project was created to help ROS beginners to understand the main tools ROS provides using a quite simple kind of robot. In order to do that, we are going to use ROSDS (ROS Development Studio). In this first part, we are going to create a robot model, visualize it in RViz and spawn it into a gazebo world.

Go to this page to start using it! Create a new ROSject and open it. That’s our development environment or ROSDS desktop:

STEP 2

Let’s start creating our package, inside of simulation_ws/src:

user:~$ cd ~/simulation_ws/src
user:~$ catkin_create_pkg m2wr_description urdf

The first we are gonna do it to create the robot description file. We are using a XACRO file. It’s a big file in this first moment, we will explain how to break it into different ones in the next posts, but for now let’s keep it like that. It’s shown only the beginning of the file. See the full content here.

STEP 3

Create a new folder urdf inside of ~/simulation_ws/src/m2wr_description and paste the robot description to a new file: ~/simulation_ws/src/m2wr_description/urdf/m2wr.xacro

<?xml version="1.0" ?>
<robot name="m2wr" xmlns:xacro="http://www.ros.org/wiki/xacro">
  <material name="black">
    <color rgba="0.0 0.0 0.0 1.0"/>
  </material>
  <material name="blue">
    <color rgba="0.203125 0.23828125 0.28515625 1.0"/>
  </material>
  <material name="green">
    <color rgba="0.0 0.8 0.0 1.0"/>
  </material>
  <material name="grey">
    <color rgba="0.2 0.2 0.2 1.0"/>
  </material>
  <material name="orange">
    <color rgba="1.0 0.423529411765 0.0392156862745 1.0"/>
  </material>
  <material name="brown">
    <color rgba="0.870588235294 0.811764705882 0.764705882353 1.0"/>
  </material>
  <material name="red">
    <color rgba="0.80078125 0.12890625 0.1328125 1.0"/>
  </material>
  <material name="white">
    <color rgba="1.0 1.0 1.0 1.0"/>
  </material>
  
  <gazebo reference="link_chassis">
    <material>Gazebo/Orange</material>
  </gazebo>
  <gazebo reference="link_left_wheel">
    <material>Gazebo/Blue</material>
  </gazebo>
  <gazebo reference="link_right_wheel">
    <material>Gazebo/Blue</material>
  </gazebo>
  
  <gazebo>
    <plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
      <legacyMode>false</legacyMode>
      <alwaysOn>true</alwaysOn>
      <updateRate>20</updateRate>
      <leftJoint>joint_left_wheel</leftJoint>
      <rightJoint>joint_right_wheel</rightJoint>
      <wheelSeparation>0.2</wheelSeparation>
      <wheelDiameter>0.2</wheelDiameter>
      <torque>0.1</torque>
      <commandTopic>cmd_vel</commandTopic>
      <odometryTopic>odom</odometryTopic>
      <odometryFrame>odom</odometryFrame>
      <robotBaseFrame>link_chassis</robotBaseFrame>
    </plugin>
  </gazebo>
  
  <link name="link_chassis">
    <!-- pose and inertial -->
    <pose>0 0 0.1 0 0 0</pose>
    <inertial>
      <mass value="5"/>
      <origin rpy="0 0 0" xyz="0 0 0.1"/>
      <inertia ixx="0.0395416666667" ixy="0" ixz="0" iyy="0.106208333333" iyz="0" izz="0.106208333333"/>
    </inertial>
    <!-- body -->
    <collision name="collision_chassis">
      <geometry>
        <box size="0.5 0.3 0.07"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="0.5 0.3 0.07"/>
      </geometry>
      <material name="blue"/>
    </visual>
    <!-- caster front -->
    <collision name="caster_front_collision">
      <origin rpy=" 0 0 0" xyz="0.35 0 -0.05"/>
      <geometry>
        <sphere radius="0.05"/>
      </geometry>
      <surface>
        <friction>
          <ode>
            <mu>0</mu>
            <mu2>0</mu2>
            <slip1>1.0</slip1>
            <slip2>1.0</slip2>
          </ode>
        </friction>
      </surface>
    </collision>
    <visual name="caster_front_visual">
      <origin rpy=" 0 0 0" xyz="0.2 0 -0.05"/>
      <geometry>
        <sphere radius="0.05"/>
      </geometry>
    </visual>
  </link>
  
  <link name="link_right_wheel">
    <inertial>
      <mass value="0.2"/>
      <origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
      <inertia ixx="0.000526666666667" ixy="0" ixz="0" iyy="0.000526666666667" iyz="0" izz="0.001"/>
    </inertial>
    <collision name="link_right_wheel_collision">
      <origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
      <geometry>
        <cylinder length="0.04" radius="0.1"/>
      </geometry>
    </collision>
    <visual name="link_right_wheel_visual">
      <origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
      <geometry>
        <cylinder length="0.04" radius="0.1"/>
      </geometry>
    </visual>
  </link>
  
  <joint name="joint_right_wheel" type="continuous">
    <origin rpy="0 0 0" xyz="-0.05 0.15 0"/>
    <child link="link_right_wheel"/>
    <parent link="link_chassis"/>
    <axis rpy="0 0 0" xyz="0 1 0"/>
    <limit effort="10000" velocity="1000"/>
    <joint_properties damping="1.0" friction="1.0"/>
  </joint>
  
  <link name="link_left_wheel">
    <inertial>
      <mass value="0.2"/>
      <origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
      <inertia ixx="0.000526666666667" ixy="0" ixz="0" iyy="0.000526666666667" iyz="0" izz="0.001"/>
    </inertial>
    <collision name="link_left_wheel_collision">
      <origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
      <geometry>
        <cylinder length="0.04" radius="0.1"/>
      </geometry>
    </collision>
    <visual name="link_left_wheel_visual">
      <origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
      <geometry>
        <cylinder length="0.04" radius="0.1"/>
      </geometry>
    </visual>
  </link>
  
  <joint name="joint_left_wheel" type="continuous">
    <origin rpy="0 0 0" xyz="-0.05 -0.15 0"/>
    <child link="link_left_wheel"/>
    <parent link="link_chassis"/>
    <axis rpy="0 0 0" xyz="0 1 0"/>
    <limit effort="10000" velocity="1000"/>
    <joint_properties damping="1.0" friction="1.0"/>
  </joint>
</robot>

What do we have there?

Basically, it’s a robot composed by 3 links and 2 joints. Every robot needs a base link, in this case, the chassis is in charge of connecting all the parts of the robot. See below an image that represents the relation between the links and joints. (Links in green, joints in blue).

STEP 4

We have our robot model defined. Let’s check it in RViz. In order to do that, let’s create a launch file and that opens RViz and fill its robot visualization with our fresh new model.

Create a new folder: ~/simulation_ws/src/m2wr_description/launch/rviz.launch

You can copy & paste the content below to the launch file we have just created:

<?xml version="1.0"?>
<launch>

  <param name="robot_description" command="cat '$(find m2wr_description)/urdf/m2wr.xacro'"/>

  <!-- send fake joint values -->
  <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
    <param name="use_gui" value="False"/>
  </node>

  <!-- Combine joint values -->
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>

  <!-- Show in Rviz   -->
  <node name="rviz" pkg="rviz" type="rviz" />

</launch>

Now, open a terminal or get back to the one you had opened before and compile the simulation_ws. (we actually don’t have anything to be compiled, but we need catkin to generate ROS header files, in order to have it into our $ROS_PACKAGE_PATH). After compiling it, launch the RViz visualization of the robot. You’ll execute something like:

user:~$ cd ~/simulation_ws
user:~/simulation_ws/$ catkin_make
user:~/simulation_ws/$ roslaunch m2wr_description rviz.launch

STEP 5

Now, let’s open the Graphical Tools application:

Great! We have a consistent robot model!

Now.. Let’s spawn it into a gazebo simulation. First, create a new launch file: ~/simulation_ws/src/m2wr_description/launch/spawn.launch

Stop the last launch file we started (for RViz), we are going to use the same terminal once again.

Start an empty simulation, from the simulations menu:

You should have the empty simulation ready:

STEP 6

Finally, spawn the robot to the Gazebo simulation. In your terminal, execute the following:

user:~/simulation_ws$ roslaunch m2wr_description spawn.launch

Check gazebo simulation again, the robot is there!

Done!

In case you have missed some part of the tutorial, you can have a copy of the ROSject we generated by writing this post: http://www.rosject.io/l/8e6c887/

In this next tutorial, we will explore the macros for URDF files using XACRO files.

[irp posts=”12948″ name=”Exploring ROS with a 2 Wheeled Robot #2 : XACROs”]

Don’t forget to leave a comment! Let us know what you think about this kind of post! We will be glad to have your opinion!

See you!!

 

Related courses:

The 10 most influential people in ROS in 2019

The 10 most influential people in ROS in 2019

I have been working with ROS since the release of C-Turtle back in 2010 when I started to apply it to the navigation system of humanoid robots. Since that time, I have witnessed how ROS has matured and how the whole ecosystem of ROS was built. I have attended many conferences on robotics in general, and of ROS in particular. I have had the chance to meet those people that are contributing to the growth and development of ROS. These are the guys that are shaping ROS’s future in one sense or another. These are what I call the big players of ROS. Given the level of popularity that ROS has gained, I thought of creating a list that would allow people, especially newcomers, to understand who is who in the ROS landscape in 2019.

As a disclaimer, I have to mention two things:

  1. First, this is my personal view based on my own experience, and as such, it may be biased because of my inability to be in all places and talk to every ROS person. Feel free to correct me in the comments below and I will use your corrections to update the article.
  2. Second, this is a list of people that are making ROS evolve, mainly developers. It is not based on political movements of the ROS world (unfortunately, these exist even here). I don’t care about the latest player in the field that puts a lot of money on ROS. This is about a list of people that have been working on bringing ROS to its current state, and that are still on the field.

Having clarified that, let’s go with the list of the people that are shaping the future of ROS in 2019.

1. Brian Gerkey

Brian Gerkey while at TechCrunch (image by Stephen Shankland @stshank)

Brian Gerkey while at TechCrunch (image by Stephen Shankland @stshank)

Brian is the CEO of Open Robotics, the company behind the development and maintenance of ROS. He has been involved in the development of ROS since its birth when it all started at Willow Garage back in 2008. Actually, Brian is more than one of the fathers of ROS. I would even say that he is a grandfather of ROS, since he was one of the creators of the Player-Stage framework for robotics, which can be considered a precursor of ROS.

In 2012, Brian co-founded the Open Source Robotics Foundation, which took over responsibility for ROS when Willow Garage closed in 2013, and he has been its CEO ever since.  That was a very important movement, without which would have meant the end of ROS.

(Updated info as in 28/III/2019, thanks to Tim Smith from Element PR and to Alex Moriarty from Fetch Robotics)

In 2017, Open Source Robotics Foundation changed their name to Open Robotics. Following the model of organizations such as Mozilla, Open Robotics is a wholly-owned taxable subsidiary of the non-profit Foundation. More information about the meaning and purpose of the name change can be found here:  https://www.osrfoundation.org/welcome-to-open-robotics/

You can find Brian at his personal page.

2. Tully Foote

Tully-Foote-ros-developer

Tully Foote while being interviewed for Robots in Depth (image by RobotsInDepth)

Tully Foote is the main developer behind ROS. Actually, his job description on his LinkedIn profile reads manager of the ROS platform at Open Source Robotics Foundation. Guau! That is amazing! What can be cooler than being the main technical guy behind what we are using everyday in our robots?!?! For a ROS lover like me… nothing!

Tully was one of the first engineers of Willow Garage. There he co-created the Turtlebot robot (together with Melonee Wise) along with creating many parts of ROS. He was one of the authors of a paper entitled The Office Marathon: Robust Navigation in an Indoor Office Environment, which I think was another key point in the development of ROS. While I was at Pal Robotics, I (together with Luca Marchionni)used to emulate his results in achieving 1 km of uninterrupted navigation of a humanoid robot (we replicated the results with the Reem robot).

His contributions to the ROS code are everywhere (check, for example, this search for his name in the packages of ROS), and he continues to develop and maintain many ROS packages, as well as the infrastructure of the ROS system.

You can find Tully at LinkedIn.

3. Dirk Thomas

dirk-thomas-ros-developers-podcast

Dirk Thomas while being interviewed for the ROS Developers Podcast

As ROS was reaching the industry, its weaknesses were revealed as being a very limiting factor in the use of ROS in commercial robot products. That is why ROS2 was created, to overcome those weaknesses. Dirk Thomas leads the team that develops this new version of ROS2 with strong knowledge and passion. I can certify that because I interviewed him for the ROS Developers Podcast and his interview was the longest I ever did. This guy had so much to say about ROS2, and he really meant it!

You can find Dirk at LinkedIn.

You can find an interesting interview with Dirk here, where he explains about the ins and outs of ROS2.

I would also recommend the series of Live Classes that we did teaching about ROS2.

4. Victor Mayoral

victor-mayoral-h-ros

Victor Mayoral at Acutronic Robotics (picture by EFEemprende)

If ROS provides a standarization of software for robots, Hardware-ROS, or H-ROS, provides a standardization in robot modules. Victor Mayoral is the CTO of Acutronic Robotics and the leader of the H-ROS project, a project that defines a common ROS interface for all the robot parts, so any company can produce compliant ROS-robot modules that are interchangeable. Simplifying a lot, H-ROS would work in the same sense as a  charger today does for (almost) all phones. The idea is so powerful that when Victor and his team proposed it to DARPA, they got financing for the development. And the rest, as we may say, is history! At present, H-ROS is a complete reality and you can even buy a robot that builds on this concept (the MARA robot).

You can find Victor at LinkedIn

You can find an interesting podcast interview with Victor here, where he talks about H-ROS and why it is so important for robot development.

Also, remember the Live Classes that I mentioned on the Dirk Thomas entry? Check them out for a very specific class where we teach about the standardization of ROS messages for robot hardware.

5. Melonee Wise

melonee-wise-fetch-robots-ros

Melonee Wise and his Fetch Robots (Photographer: David Paul Morris/Bloomberg)

Melonee is one of the founders of ROS. Together with Tully Foote, she was the creator of Turtlebot robot as an inexpensive robotic option for roboticists to learn and practice ROS. She was a pioneer of ROS and developed many of its packages.

At present, Melonee is the CEO of Fetch Robotics, a company pioneer in building ROS-based collaborative robots. Actually, prior to Fetch, Melonee was co-founder and CEO of the Willow Garage spin-off, Unbounded Robotics, which was an amazing feat for the time. However, due to legal matters (of which I don’t know the details), Melonee had to shut down Unbounded Robotics, raise money again, and build a second company (this time, Fetch Robotics). How amazing is that!?

Even if at present many companies are doing ROS-based collaborative robots, she can be considered the pioneer for commercial collaborative robots based on ROS.

You can find her at LinkedIn.

You can find an interesting podcast interview with Melonee here, where she talks about their Fetch robots and more.

6. ROS Industrial

ros-industrial-consortium

ROS Industrial consortium logo (image by the ROS Industrial consortium)

Yes, I know this is not a person, it is an entity… so what? The job that the ROS Industrial consortium is doing is so important that it could not be led by a single person, so a consortium was created.

As ROS was becoming more and more popular among service robots, some clever guys thought that it was important to give ROS a push and introduce it into the world of industrial robots. Industrial manufacturers would not accept ROS easily since it would mean that they would have to release their proprietary interfaces. The ROS Industrial consortium was created in order to help adapt ROS to those industrial robots, and to show to the industrial robot manufacturers the increased benefits that they would get from adopting ROS rather than not.

There are three different world areas where the ROS Industrial Consortium operates under a different team: one for the Americas (ROS Industrial Consortium Americas), another for Europe (ROS Industrial Consortium Europe) and another one for Asia (ROS Industrial Consortium Asia-Pacific).

The leaders for the three different consortiums are:

You can find all the information about ROS Industrial Consoritum on their website.

You can find an interesting podcast interview with Mirko Bordignon here, where he describes in further detail the whys of the consortium and the different regions, and its long-term goals.

7. Luca Marchionni

luca-marchionni-pal-robotics-talos

Luca Marchhionni with Talos robot (picture by Luca himself)

Luca Marchionni is the CTO of Pal Robotics company. At Pal Robotics, he leads the technical team that develops human-sized, legged humanoid robots; that is, robots that walk. It is the only company in the world that sells human-sized, legeged humanoids based on ROS off-the-shelf. Luca is a ROS expert since C-Turtle and, at present, he is in charge of the development of two humanoid robots: Reem-C and Talos.

Luca and I worked together for many years on the same team inside Pal Robotics (the navigation team) where we developed the navigation system of the humanoid robots. I can tell you that he is an expert in ROS and programming! However, the most important point to include about Luca here is twofold:

  1. He is leading the technical team of the only company in the world that sells ROS-based, human-sized humanoids.
  2. Under his leadership, engineers from Pal Robotics developed many parts of ros_control, a super important package that provides actual control of the joints and wheels of any ROS-based robot using ROS communication. Before the existance of ros_control, controlling a robot’s joints was a nightmare!

You can find him at LinkedIn.

You can find an interesting podcast interview with Luca here, where he talks about what the process is for developing ROS-based humanoids.

8. Dejan Pangercic

Dejan-pangercic

Dejan Pangercic on the right with his co-founder Jan on the left (picture from Apex.AI)

The trajectory of Dejan in ROS is a long one. He started with ROS while doing his PhD research at Technical University of Munich. Then, he applied his knowledge to agricultural robots while working for Bosch and for Deep Field Robotics. Recently, he co-founded a company called Apex.AI, which is building a certified version of ROS2 that can be securely used as the operating system for autonomous cars. Basically, they are building a car operating system based on ROS, the Apex.OS. The idea is so important and powerful that the company has recently secured 13 million in investments and is now developing at full speed.

You can find Dejan at  LinkedIn

Here there is a very interesting interview that I did with Dejan, where he explains the ins and outs of his Apex.OS.

9. Yoonseok Pyo

yoonseok-pyo

Yooseok Pyo (the one on the right!) (picture by robotpilot.net)

Yoonseok is a senior research engineer at Robotis company in Korea. Among other things, he is the leader of the development team of  the Turtlebot 3 robot, the last generation of Turtlebot. Turtlebot 3 is used as the main ROS robot to start and practice robotics with ROS all over the world. So, Pyo is affecting the way many people in the world are learning and practicing ROS. Recently, Pyo became a member of the ROS2 steering commitee for the development of ROS2.

Additionally, Pyo has written 10 books about ROS and robots, including his latest one, which includes most of the aspects of ROS that you may need (from what is a topic to how to do navigation and grasping with ROS). You can download his book for free here.

The work of Pyo acts as a pioneer for the spread of ROS in Korea in particular, and in the world in general.

You can find Pyo at LinkedIn.

10. Jenssen Chang

jessen-chang

Jessen Chang on the left of the picture (picture by Robotnik)

We must face it, the introduction of ROS in China is still at a very early stage. Because of that, Jenssen is pioneering the distribution of ROS-based robots in China. Jessen is the founder and general manager of Gaitech company. He is the distributor in China for the main ROS-based robotics companies of the world, like Robotnik, Clearpath, Fetch Robotics, Pal Robotics, Robotnik, etc. He is also the distributor in China of our online academy for learning ROS online (here the Robot Ignite Academy international, and here the Robot Ignite Academy for China).

It must be said that Gaitech is not only distributing third party robots, but also building their own, all of them based on ROS.

Recently, Jenssen was selected as a local co-chair of the next ROS Conference 2019 that will be held in Macao in October.

11. Chunxu Hu

胡春旭 chunxu hu

Chunxu Hu 胡春旭 (Photo by Richard Yo)

If you study ROS in a Chinese-speaking area, then you must have heard of Gu Yue Ju (古月居).

The real name of Gu Yue is Chunxu Hu. As the earliest ROS developer in China, he has many years of development and application experience, and has participated in research and development of robots, such as service robots and robotic arms.

In 2012, Chunxu began to share his thoughts on the process of ROS learning on his “Gu Yue Ju” blog. His article enlightened many Chinese ROS learners and exposed many people’s yearning for ROS.  He has published nearly a hundred articles on ROS, which are continuously updated. In my opinion, he is the person that has done more for the awareness of ROS in China than anyone else.

In 2018, he published “ROS Robots Development Practice”(《ROS机器人开发实践》), which introduced the basics and application practices of ROS to more learners through Chinese.

12. Matt Droter of ROS Agriculture

Matt-Droter-ros-agriculture

Matt Droter is the founder of the ROS Agriculture group (picture by Matt Droter)

Matt is the founder of the ROS Agriculture group. Within the ROS Agriculture group, he has grouped a series of farmers/engineers who aim to automatize as many activities of agriculture work as possible. Basically, they want to create ROS-based machines for agriculture in a similar way to that of ROS Industrial. At present, they are concentrating more on how to convert already existing agriculture machines (like tractors) into autonomous ones. They build the control system using different pieces and use ROS as the glue system to move the machines.

The group is a young one, but it is quite active and consistent. You can join their online meetings every Tuesdays on Youtube, where the advancement of the group is discussed. You can also join their Slack channel for more quick and active responses.

You can find Matt on LinkedIn

Here is a podcast interview with Kyler Laird, a member of the ROS Agriculture group, who explains a lot about the reasons and goals of the group and how he uses ROS to automatize his tractor.

13. Dave Coleman

dave-coleman-moveit

Dave Coleman leading the MoveIt! development (image by Dave from his Github)

Dave is the CEO of Picknik Consulting company, a company dedicated to providing integrated robotics solutions. However, the reason he is included in this list is not because of his company, but because of the package that he maintains and develops: the MoveIt! package. Until the appearance of MoveIt!, doing grasping tasks with ROS was a nightmare. MoveIt! represents such a big step forward in allowing any ROSified robot to do quite acceptable grasps.

Really, I am so happy to have MoveIt! for our ROS robots! And that is because I suffered a lot. I was leading a team to participate in the Robocup@Home competition using the Reem humanoid robot. That was 2013. No MoveIt! existed yet. For that, we had to do simple grasps of very simple objects (basically bottles, cans, and boxes). But doing that with the humanoid was almost impossible. Even if we were using ROS, we had to create all the different parts of the grasping system: the kinematics solver for that specific robot (which was randomly working), the sequence of movements to grasp an object (rough approach, close approach to the object, close grip, lift a little bit, then move to standard position), the use of perception to avoid obstacles, etc… It never really worked! Sometimes, there was no solution for the kinematic solver. Sometimes, the trajectory generated was like dancing flamenco. Sometimes, it was crashing against obstacles. Most of the time, there was a crash in the program!

Now with MoveIt!, you can have your arm grasping things in 5 minutes, even avoiding obstacles detected by a pointcloud device. Amazing!

Apart from developing MoveIt!, Dave is an expert in integrating robotic hardware with real-time systems, using ROS and ros_control.

You can find Dave on LinkedIn.

14. Shinpei Kato

shinpei-kato-autoware

Shinpei Kato (picture by Fujitsu Film)

I don’t know very much about his previous history on ROS, but I decided to include him here because of the tough movement he did a couple of years before, by releasing an open source of the first ROS-based, fully autonomous car control system: Autoware.

At present, his development has led to the creation of the Autoware Foundation, where several members of the ROS community have joined forces to push for the faster development of an autonomous car full solution based in ROS.

You can find Shinpei at LinkedIn.

Conclusion

The world of ROS is evolving at a very fast pace. I know there are thousands of people developing ROS packages and libraries, and that I left many out. There are many details in ROS that I cannot get from my local position. In this article, I tried to plot the hottest ones at the current stage based on my personal vision. I’ll be happy to correct, include, or remove any entry if you send me the data, as long as they are not based on political issues (you know, I have to include this teacher or boss because otherwise he will be mad at me).

I know I mentioned in the title the top 10 positions, and in the end, there are 14… you know… it looks better to have a 10 in the title!

The positions in this list have been won by hard work over many years. But as anything in life, the leaders of today may not be the ones of tomorrow. We’ll see… but for that, we’ll have to wait until next year.

Photo at the top of the article: Celebrating the 2 years of ROS (Photo: Keenan Wyrobek)
Learn ROS with C++  or Python?

Learn ROS with C++ or Python?

This is a question that I get asked all the time:

Do you recommend me to learn ROS with C++  or Python?

As you may know, you can create ROS programs mainly in two programming languages: Python and C++. There are other languages available like Swift, Lisp or others, but those are not fully supported. So for the rest of the article, we will consider that only Python and C++ are the available ones for a newcomer. Mostly, whatever you can do in ROS with C++, you can do it also with Python. Furthermore, you can have C++ ROS programs (ROS programs are called nodes) talking to other Python ROS nodes in the same robot. Since the nodes communicate using standard ROS messages, the actual language implementation of the nodes is not affecting their communication. That is the beauty of ROS.

If that is the way of working of ROS, then, why not to let everybody program in the language they want? Well, because programming in one language or another has its consequences, especially when you are learning ROS. Let’s have a look at them.

Programming ROS with Python

Pros of programming ROS in Python

  • Is faster to build a prototype. You can create a working demo of your node very fast if you use Python, because the language takes care of a lot of things by itself so the programmer doesn’t have to bother.
  • You don’t need to compile, and spend endless hours trying to catch a hidden bug. Even if you can have bugs in Python, the nature of them are a lot easier and faster to catch.
  • You can learn Python very fast.
  • You can make really short programs for complex things
  • The final code of your node is quite easy to read and understand what it does.
  • You can do anything with Python. Python is a very powerful language with libraries for anything you want.
  • It is easier to integrate it with web services based on Django. Since Django is based on Python, you can integrate ROS functions easily in the server calls.
  • It is easier to understand some ROS concepts if you use the Python API, because some complex concepts are hidden for the developer in the ROS Python API. For example, things like the Callback Queue are handled directly by the ROS Python API.

Cons of programming ROS in Python

  • It runs slower. Python is an interpreted language, which means that it is compiled in run time, while the program is being executed. That makes the code slower.
  • Higher chances of crashing in run time, that is, while the program is running on the robot. You can have a very silly mistake in the code that won’t be cached until the program runs that part of the code (in run time).
  • Unless you define very clear procedures, you can end with a messy code in a short time if the project grows. I mean, you need to impose some rules for developing, like indicating every class you import from which library is, force strong types on any definition of a variable, etc.

ROS Python or ROS C++ image 2

Programming the Aibo robot in ROS Python

 

Programming ROS with C++

Pros of programming ROS in C++:

  • The code runs really fast. Maybe in your project, you need some fast code.
  • By having to compile, you can catch a lot of errors during compilation time, instead of having them in run time.
  • C++ has an infinite number of libraries that allow you to do whatever you want with C++.
  • It is the language used in the robotics industry, so you need to master it if you want to work there.

Cons of programming ROS in C++:

  • C++ is a lot more complex to learn and master. A LOT
  • Just creating a small demo of something requires creating a lot of code.
  • Understanding what a C++ program does can take you a long time.
  • Debugging errors in C++ is complex and takes time.

ROS Python or ROS C++ image 1

ROS C++ code

 

A proposed ROS learning path

You: I do understand your list of pros and cons, but in the end, what should I do? I want to learn ROS… do I have to use Python or C++ for learning ROS?

Me: Well that depends on your situation. Based on your situation, some of the cons may not be a con (if you are a master of C++ the fact that C++ is difficult doesn’t affect you). So it may be convenient for you to start ROS with C++… if your goal is the industry! (because the robotics industry needs the speed of C++ for their robot programs). However, if your goal is research and academia, I would not recommend learning ROS with C++ even if you mastered it, because in academia, speed in testing hypothesis is more important than speed of execution. Hence Python would be your choice.

It all depends on your situation.

You: Yes but I need some clear examples of the learning path for the typical newcomer to ROS.

Me: OK, let me give you the typical situation.

One situation that I get all the time, especially at the University, is that students that come to learn ROS do not know neither C++ nor Python (actually, most of them not even know about Linux shell, but that is another matter). In that case, I strongly recommend start learning ROS using Python. Really, believe me, it is too much to try to learn ROS at the same time that you learn C++. I’ve seen many times. People get frustrated and complain about the difficulty of ROS. Yes, ROS is difficult but the thing is that you tried to swallow too much by learning C++ and ROS at the same time.

You: But I want to go to work for the industry. Does that mean that I’ll have to stay with Python every time that I program with ROS, so I won’t have access to the industry?

Me: No. What I’m proposing here is that you go step by step. I know you want to go fast, but that doesn’t work. Go step by step and you will actually learn faster and master both ROS for Python and for C++ (just if you want to).

You: Ok, so how do I learn step by step ROS if I know neither Python nor C++?

Me: Well, first you need to learn Python. Learn the basics of Python and how to manage classes. That is mostly what you will need from Python. You can learn it in this online free course. Once you know more or less about Python, then start learning ROS in Python. You should learn the following subjects in the following order:

  1. ROS Basic concepts
    1. Topics
    2. Messages
    3. Packages
    4. Services
    5. Actions
  2. How to debug with ROS
    1. Rviz
    2. rqt tools
  3. ROS TF
  4. ROS URDF
  5. ROS Gazebo
  6. ROS Control

(note: you can find all those subjects explained in the ROS wiki, or if you want something more interactive, you can try our ROS online academy).

At this point in time, you will already know the basics of ROS and understand what it is and how it works. Also, you would have practiced a lot writing Python code with classes. Now it is the moment to switch to C++ in case you want to program in that language (if it is not your case and you feel comfortable with Python, jump to the next step). Learn now the basics of C++, including classes and pointers (especially smart pointers, because they are used a lot in ROS). Then, you will have to revisit some basic concepts of ROS, because they are treated differently in C++.

So you need to go back again to learn the basics of ROS, but this time in C++. Study the following subjects:

  1. ROS Basic concepts
    1. Topics
    2. Messages
    3. Packages
    4. Services
    5. Actions
  2. ROS TF
  3. ROS Control

Finally, continue getting more knowledge of ROS, either in C++ or in Python. Learn the following subjects, without any specific order. Just choose the subject based on your own preferences or needs:

  • ROS Navigation
  • ROS Perception
  • ROS Manipulation
  • ROS Machine Learning
  • ROS for Industrial Robots

That’s it!

You: it sounds like a lot of work, but it makes sense.

Me: Yes it is! But nobody said that was going to be easy…

Once you have mastered most of the subjects of ROS and both Python and C++, you can start developing like a pro.

You: What does it mean like a pro?

Me: Well, for me it means that you will create nodes in either C++ or Python, depending on your requirements.

For example, while I was creating the navigation software of a human size humanoid robot, I created the localization algorithm using C++, but I created the recovery behavior when lost using state machines in Python. The localization algorithm is a complex algorithm requiring to run fast and consuming a lot of resources (because of the particles), that is why I did it in C++, but the coordination behavior did not require a fast execution, but instead, required a clear structure and easy reading to understand the logic behind.

 

Conclusion

Learning ROS with Python or C++ depends on your current situation and the reason why you want to learn ROS. If you are like the typical newcomer (no knowledge of Python nor C++), then definitely, you should start learning ROS with Python and then decide whether it is convenient for you to move to C++.

Let me know about your experiences in the comments below. Did you learn ROS using C++ or using Python? Why? Would you have done differently if you could go back?

Take Away

ROSDS Docs – ROSject

ROSDS Docs – ROSject

Hello ROS student/developer/enthusiast!

In this docs you are going to find necessary information to make the most of ROSDS – ROS Development Studio.

From creating scripts for the robot simulations we provide to testing an artificial intelligence algorithm for a specific problem you are working on. ROSDS is the tool that can help you on robotics development.

Organized ROS projects – ROSjects!

What is a ROSject?

 

Starting from the drama ROS developers have in life, how to separate scripts, packages or even workspaces in a manner I can reuse programs and simulations organized? Our team of engineers agreed to provide different workspaces, one for simulations and another for scripts (navigation, control, perception, etc.). All included in a single ROSject!

Basically, in ROSDS you have a Dashboard where you can see the list of ROSjects (ROS project). And each ROSject is a fresh new home directory (like the one you have in a common local computer: /home/user/). Inside of each ROSject a developer can create as many workspaces as needed. Any other file will be kept in your ROSject. Since it is saved properly, all of your development area will be restored next time you open a ROSject in our environment.

Finally, a ROSject is easily connected to any simulation and gazebo worlds chosen by our team of engineers. Furthermore, developers can create datasets. A bucket to save massive data, for example, pack of images for artificial intelligence learning!

In order to start using ROSDS, go to http://rosds.online sign up and create a new ROSject!

Pin It on Pinterest