ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Getting started with robots from ROS wiki

asked 2016-08-16 20:18:10 -0500

cflavs gravatar image

Hello, I´m trying to start a project simulating a robot from robots wiki but I´m not exactly sure how to program these robots. I followed some tutorials but they all used a launch file from demo source, I want to write code on my own using the ros arquitecture (rostopics, stacks, nodes, publisher and subscriber, etc)that I´m learning on some books (e.g. Learning for Robotics Programming), but it´s not exactly clear to me how to apply then on a roboTican or husky for example, does anyone has any material (tutorials, books, videos, anything) to start?

Also, these robots have specific embedded sensors on it (laser, ultrasonic, depth sensor), but it´s possible to implement extra sensors? I want to create a system where the robot can retrieve information of the environment and execute some actions based on it, for example check the temperature of the room and get a couple of water if it´s too warm. Does anyone has any suggestion of how can I do something like that?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-08-17 10:55:21 -0500

patrchri gravatar image

updated 2016-08-17 16:51:30 -0500

Ok, I will try to answer your question even if it is too general and I have not used the ready robots you see in the wiki page. I will focus my general explanation on Husky.

The robot

A virtual robot in ROS is the represantation of a urdf code. A structural code in other words, that describes the features of the robot (shapes, connections between the different shapes, mass, other enviromental factors like friction etc). When you want to simulate a robot in gazebo you upload this code in a parameter server which stores all these features and uses them to create your simulation. You can create a robot of your own by following this tutorial. You can find more links and tutorials on your own, but this is the basic tutorial page provided by ROS - read this page even if you don't create your own model to understand how to setup your filesystem and the general features provided.

Now, if you don't want to create a robot of your own and use a ready model, for example Husky, you need to find the description of Husky, which can be found here. In the file husky_custom_description you can find a urdf file which contains the robot structural code - the team that created the robot used a program like meshlab and generated the code from meshes ( the .dae files represent that) to implement difficult shapes - you can add your own elements (other sensors for example) in this structure with joints to the base platform. In the husky_gazebo folder you will find a code written using <gazebo> tags. These tags must always be included in your description because they define some gazebo elements (elements necessary for the gazebo world like a controller for example). As you can see the husky_gazebo is based on the structural code from the husky_description. They seperated the directories for better organization of the project.


Now, to run your robot in gazebo, you need to create a launch file like one described here - I would again suggest to read the tutorials here even if you don't have your own custom robot. To run Husky in gazebo, simply follow this link's instructions. By uploading your urdf to gazebo, the gazebo translates the urdf to sdf and puts it in a world (here the empty_world is used) that you can modify.

As I saw the husky project uses <plugin name="gazebo_ros_control" filename="">, which will allow you to use all that you read (nodes, topics etc). Simply after you start the simulation, check what topics are being used (published/subscribed by the gazebo node). The gazebo node in a real robot will be your device's driver node. With the data used you can implement almost anything without even having a robot.

Temperature Sensor

I cannot help you with the temperature simulation, because I have never used a sensor like that in gazebo, I don't know if this exists. You can buy ... (more)

edit flag offensive delete link more


Thanks for the reply! It was really usefull! I didn't know much about URDF model so I was trying to simulate robots thinking only on ROS basic structure (nodes, topics, etc). I followed the tutorials (this's why I'm only replying now) and now I'm going to robotican_armadillo model.

cflavs gravatar image cflavs  ( 2016-09-10 09:59:19 -0500 )edit

I am glad you solved your question.

Have fun! :)

patrchri gravatar image patrchri  ( 2016-09-28 14:49:30 -0500 )edit

Question Tools

1 follower


Asked: 2016-08-16 20:18:10 -0500

Seen: 534 times

Last updated: Aug 17 '16