Ask Your Question
0

Confusion when Creating a Robot Configuration Launch File for my specific robot

asked 2020-07-14 11:12:44 -0600

jimc91 gravatar image

updated 2021-09-06 13:17:45 -0600

Mike Scheutzow gravatar image

I am working through the following Navigation Tutorials on ROS.org (link below)

http://wiki.ros.org/navigation/Tutori...

I am using Ubuntu16.04LTS & ROS Kinetic.

My robot is the Turtlebot3 Waffle Pi that is equipped with a 2D LDS and a raspberry pi camera (link below to waffle pi specs):

https://emanual.robotis.com/docs/en/p...

In section 2.2 on the ROS navigation tutorial I am slightly confused. I have created the my_robot_configuration.launch file and have pasted in the below text as advised on the tutorial.

   <launch>

       <node pkg="sensor_node_pkg" type="sensor_node_type" name="sensor_node_name" output="screen">

        <param name="sensor_param" value="param_value" />

     </node>

     <node pkg="odom_node_pkg" type="odom_node_type" name="odom_node" output="screen">

        <param name="odom_param" value="param_value" />

     </node>

     <node pkg="transform_configuration_pkg" type="transform_configuration_type" name="transform_configuration_name" output="screen">

        <param name="transform_configuration_param" value="param_value" />

 </node>

</launch>

I then need to edit the above text to suit my robot and the sensors etc.

So I first need to:

  1. Replace "sensor_node_pkg" with the name of the package for the ROS driver for my sensor

  2. Replace "sensor_node_type" with the type of the driver for my sensor

  3. Replace "sensor_node_name" with the desired name for my sensor node

  4. And finally replace "sensor_param" with any parameters that my node might take

The 2D LDS that is equipped with my robot is the hls_lfcd_lds_driver (see link below):

http://wiki.ros.org/hls_lfcd_lds_driver

I had carried out some tutorials for the turtlebot3 on the robotis page so I should have this information in the turtlebot3 launch files?

For points 1 to 4 above I found the Turtlebot3_lidar.launch file and have pasted that text into my new text file as below:

<launch>

   <node pkg="hls_lfcd_lds_driver" type="hlds_laser_publisher" name="turtlebot3_lds" output="screen">
    <param name="port" value="/dev/ttyUSB0" />
<param name="frame_id" value="$(arg set_frame_id)"/>
 </node>

However, I am very confused and unsure where to find similar information for the odometry packages and the transform configuration packages.

Where should this be found?

Sorry if this message is too long, I wanted to be as specific as I could.

edit retag flag offensive close merge delete

Comments

I don't have a turtlebot but I do have google. Your ODOM is being published by turtlebot3_core so if you launch using the documentation provided with the robot it will taken care of. If you just want to learn, you can use the launch files provided with the robot to get an understanding of how they work.

billy gravatar image billy  ( 2020-07-16 18:33:03 -0600 )edit

@jimc91 Where you able to figure everything out? I'm having struggles with this as well.

distro gravatar image distro  ( 2021-07-06 15:19:09 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2020-07-15 07:00:00 -0600

Weasfas gravatar image

Hi @jimc91

I am going to answer your question but I am sure there are community members here that do know more than me about this particular topic, but I will try, so here we go:

  1. The sensor_node_typeis refering to all your sensor drivers that you need to produce sensors readings. For your particular set up, a Lidar and a Camera.
  2. The sensor_node_type is refering to the ROS wrappers that use the sensor readings and convert them into ROS usable msgs.
  3. The sensor_node_name is self explanatory and refers to a unique name to identify each used sensor.
  4. An finally the sensor_param refers to all those needed params for your sensor configuration, that you may find in your sensors official repository, or even in already made ROS wrappers for those sensors. Since you have a camera you will also need to determine intrinsic and extrinsic calibration parameters.

Then you have the odom_node_pkg refering to any package or utility able to provide any sort of odometry information. You have multiple approach for this.

  1. You can produce your own odometry estimation from your robot velocity.
  2. You can use probabilistic localization if you have a map with AMCL.
  3. You can use Kalman filters to produce accurate odometry output with robot_lozalization.
  4. There are more ways to produce odometry but I just mentioned the ones that I mos familiarize with. Of course since you have a camera you can also take advantage of Visual Odometry paradigm, but I cannot say too much about this topic.

Finally the transform_configuration_pkg is refering to having a proper tf_tree to relate any robot frame that you may have. If you have any doubts of tfs and frames you can check this. The usual (and standard tf tree) is needed to know the relation between points in space in any robot frame in which you can work. So, as a basic mobile robot you will have something like:

World --> Map --> Odom --> Base_footprint --> Base_link --> wheels, sensors, ...

And this is used to operate properly in the frame in which you are navigating with your robot. For the Base_footprint onward the tfs use to be static, so they can be loaded with the robot_description, however the rest are not static and are usually produced by your odometry/localization nodes. For instance, AMCL is able to produce a transformation between map and odom allowing you to localize in the map frame, the robot_localization can be configured to produce several transformation as well, even your own odometry node can have a transform broadcaster to produce the Base_footprint --> Odom transform.

So to sum up, you will need sensor drivers to produce proper readings, ROS wrappers to use the sensors with ROS utilities, a good source of odometry information and a proper tf tree to be able to localize yourself in the enviroment.

Hope that can help you understanding this things. If anyone is willing to add more information about this I will glad to discuss it here.

Regards.

edit flag offensive delete link more

Comments

Hi @Weasfas, I don't even know where to go search for in my computer files to search for stuff in the navigation stack. I don't know where to find the Turtlebot3_lidar.launch file. Where do I find such things?

distro gravatar image distro  ( 2021-07-06 14:37:32 -0600 )edit

Hi @distro, the ros navigation stack is provided by the installation of ROS as a binary package ready to be installed with apt. The turtlebot launcher you mentioned can be found here as a file of the turtlebot metapackage that constains all solutions developed by the turtlubot team.

Weasfas gravatar image Weasfas  ( 2021-07-06 14:50:36 -0600 )edit

@Weasfas Im kinda confused, I just type in '''apt-get install''' what exactly? I already have ros installed.

distro gravatar image distro  ( 2021-07-06 15:18:12 -0600 )edit

@Weasfas : Could you please give an example how exactly to edit the launch file? What do I replace "odom_node_pkg" with, or what replace "transform_configuration_pkg". Sorry I am new to ROS.

distro gravatar image distro  ( 2021-07-06 23:44:28 -0600 )edit

@distro as said in my answer the odom_node_pkg is whatever package(s) you have, implemented by you or obtained from any free source code, that provides a sort of Odometry information to tell where is your robot in a known frame (for instance Odom). Here is a good wiki section explaining what is an Odometry msg and how to set up your robot. Here is another resource in the case you do not now what is a tflink text. So, what you want to achieve is a set up for navigation, that comprehend first a good tf tree in which every robot frame is properly set up, allowing you to check every link of your robot (transform_configuration_pkg) and then a good odometry source that tells you where is your robot in your navigation frame (E.g.: Map) (odom_node_pkg) Hope this help. However, you may want to ask a question ...(more)

Weasfas gravatar image Weasfas  ( 2021-07-07 04:22:32 -0600 )edit

@Weasfas I try asking my own questions but people don't respond. I will keep trying though. So for example: "odom_node_pkg=navs_msgs.msg" "odom_node_type=Odometry" "name= the name of the node at the ros_init"? Is this correct? If so I am not sure what to place for "odom_param"

Also for "transform_configuration_pkg", I think the package "move_base" which I am using already takes care of transformation of my frame_id of my lidar sensor and my base link, so do I still need to declare these things? for example transform_configuration_pkg=move_base_msgs.msg"?

Also, if I understand correctly, if I make different executable python codes that have the nodes I am declaring in the launch file, and I roslaunch the launch file, I'm guessing all those executable python codes will run at the same time? Do I need to connect any of those codes in some way? For instance, do I import ...(more)

distro gravatar image distro  ( 2021-07-07 12:25:29 -0600 )edit
  1. odom_node_pkg is a package that provides you with nav_msgs/Odometry and base_link or base_footprint --> Odom transform.
  2. Move base does only produce cmd_vel commands to move the platform. In fact if you take a look at the wiki diagram, the package tells that it needs your tf tree and your odom msg for localization. Hence you will need to provide a proper tf tree. You can do that with Xacro and URDF or launching the turtlebot description (run rosrun rqt_tf_tree rqt_tf_tree to se yor tf tree with the robot launched).
  3. ROS is a middlewware itprovides a communication standar between modules and basic utilities. If you have implemented two nodes you will need to conect both, commonly done with Publisher-Subscriber paradigm.
Weasfas gravatar image Weasfas  ( 2021-07-07 15:37:55 -0600 )edit

But I feel like you may need to start from the barebones of what is ROS and how to use ROS by learning and reading the wiki and tutorials sections.

Weasfas gravatar image Weasfas  ( 2021-07-07 15:38:50 -0600 )edit
0

answered 2021-09-06 13:17:13 -0600

Mike Scheutzow gravatar image

updated 2021-09-06 13:31:25 -0600

There are already ready-to-run ros packages for a turtlebot3. Have you looked at wiki page http://wiki.ros.org/turtlebot3_bringup ? In particular, the manual in Section 1.

You should study the content of these files and get some ros experience before you try to customize things. The following apt package will install all needed files into /opt/ros. See the corresponding wiki pages for more info.

ros-kinetic-turtlebot3

This installs:

ros-kinetic-turtlebot3-bringup
ros-kinetic-turtlebot3-description
ros-kinetic-turtlebot3-example
ros-kinetic-turtlebot3-navigation
ros-kinetic-turtlebot3-teleop

So far I have assumed you have a real turtlebot3. If instead you want to simulate a turtlebot3, there are additional apt packages to give support for that.

edit flag offensive delete link more

Comments

@Mike Scheutzow For clarification, I have a real turtlebot3 robot and I am also messing around with a simulated turtlebot3 as well. I already have some months experience with ros and I already have the turtlebot3_Navigation package, I know exactly what yaml file I should be changing for what I want. It just doesn't do anything when I edit that specific file. This is my only problem, for some reason changing the inflation radius does absolutely nothing and I just want to know the reasons why something like that could happen.

Again, I have the Turtlebot3_Navigation package in my directory catkin_ws/src. I know I go to "Turtlebot3_navigation/param/costmap_common_params_burger.yaml" I know this is where I will find the inflation radius, when I edit said inflation radius, nothing happens, it doesnt work. I am looking for reasons why it doesnt work and how to fix it. Hope this is clear.

distro gravatar image distro  ( 2021-09-09 01:58:31 -0600 )edit

This question does not appear to be about inflation radius. Please open a new question if you want to switch topics.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-09-09 06:33:38 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-07-14 11:12:44 -0600

Seen: 351 times

Last updated: Sep 06 '21