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

Revision history [back]

click to hide/show revision 1
initial version

Hi newcastle,

I think I understand your question.

Basically you want to know how you can use ROS to move your robot (real or in a simulated environment). At first let me say you that, despite what many people here would say, you'll never find this answer through the ROS tutorials. because the ROS tutorial tells you how you could write a specific algorithm using ROS or how to deal with a specific ROS library, but they never tell you how to setup your robot. Basically if you want to use ROS you should already have some knowledge about robots, meant as a system of sensors, controllers, communication and automated systems...and which criteria you need for your robot to work. In this case I mean: what is a pose, an orientation, a vector speed, an odometry information referred to a know position, or how to derive it from the environment. Once you get familiar with those terms and concepts, then you can try to use ROS as a communication systems based on nodes and topics and brings the whole concept expressed above in a abstracter level, letting all those robots functionalities working together.

Now...said that... I want to give you a more real answer to your question given a specific case.

  1. Case REAL: in this case you have already an existing robots, which (since you didn't specify it I assume it is a wheeled robots like a sumovore) has encoders attached on its wheels. The values coming from the sensors must be sent through the topic structure provided by ROS to the corresponding program. The program will be able to convert the angle read from the encoders into a path and running relatively fast in your PC it will knows every time where it is. Pay attention that in this case you should be familiar with the concept of dead reckoning, which (as I said before) is it presumed to be already know if you want to develop a robot.

  2. Case SIMULATION: in this case you are interested in, for example, move your robot around in RViz or Gazebo reading, for example, the position from a gamepad or Joystick. Furthermore you can attached virtual sensors to you robot and get a map of the enviroment: the robot will moved based on this information. Assumed you already know how to calculate a position of the robot, then you can simply broadcast this information though ROS using a particular ROS broadcaster, which will send the movement of your robot (referred as a robot transformation) through the ROS system. A very bare bone example can you find here. ANYWAY... in case you are going to simulate your robot, I strongly suggest you to buy or get the following book: ROS by Example I. it is written for people who want to build up their robot and let him moving in RViz. Even if you are many times in the book suggested to get back to the tutorials, and that can sound at the beginning confusingly, you need just to understand the idea behind and how to translate it in a working concept using ROS. With the ROS tutorials alone, you'll never get the wanted answer;

That's all for the moment. Please, take it with a grain of salt, and try to understand basically what you need, what you want, and what target you are supposed to reached. Robotics is a huge and wide spread topic, it is not possible to answer shortly to your question. All the exampled I explained are just a 0.00000001% of the whole range of possibilities and robot configurations. I depicted just a very easy and common situation where you want to move small wheeled robot and never talked, for example, about sensors or other navigation possibilities.

I hope it helps.

Hi newcastle,

I think I understand your question.

Basically you want to know how you can use ROS to move your robot (real or in a simulated environment). At first let me say you that, despite what many people here would say, you'll never find this answer through the ROS tutorials. because the ROS tutorial tells you how you could write a specific algorithm using ROS or how to deal with a specific ROS library, but they never tell you how to setup your robot. Basically if you want to use ROS you should already have some knowledge about robots, meant as a system of sensors, controllers, communication and automated systems...and which criteria you need for your robot to work. In this case I mean: what is a pose, an orientation, a vector speed, an odometry information referred to a know position, or how to derive it from the environment. Once you get familiar with those terms and concepts, then you can try to use ROS as a communication systems based on nodes and topics and brings the whole concept expressed above in a abstracter level, letting all those robots functionalities working together.

Now...said that... I want to give you a more real answer to your question given a specific case.

  1. Case REAL: in this case you have already an existing robots, which (since you didn't specify it I assume it is a wheeled robots like a sumovore) has encoders attached on its wheels. The values coming from the sensors must be sent through the topic structure provided by ROS to the corresponding program. The program will be able to convert the angle read from the encoders into a path and running relatively fast in your PC it will knows every time where it is. Pay attention that in this case you should be familiar with the concept of dead reckoning, which (as I said before) is it presumed to be already know if you want to develop a robot.

  2. Case SIMULATION: in this case you are interested in, for example, move your robot around in RViz or Gazebo reading, for example, the position from a gamepad or Joystick. Furthermore you can attached virtual sensors to you robot and get a map of the enviroment: the robot will moved based on this information. Assumed you already know how to calculate a position of the robot, then you can simply broadcast this information though ROS using a particular ROS broadcaster, which will send the movement of your robot (referred as a robot transformation) through the ROS system. A very bare bone example can you find here. ANYWAY... in case you are going to simulate your robot, I strongly suggest you to buy or get the following book: ROS by Example I. it is It has been written for people who want to build up their robot and let him moving in RViz. Even if you are many times in the book suggested to get back to the tutorials, and that can sound at the beginning confusingly, you need just to understand the idea behind and how to translate it in a working concept using ROS. With the ROS tutorials alone, you'll never get the wanted answer;

That's all for the moment. Please, take it with a grain of salt, and try to understand basically what you need, what you want, and what target you are supposed to reached. Robotics is a huge and wide spread topic, it is not possible to answer shortly to your question. All the exampled I explained are just a 0.00000001% of the whole range of possibilities and robot configurations. I depicted just a very easy and common situation where you want to move small wheeled robot and never talked, for example, about sensors or other navigation possibilities.

I hope it helps.

Hi newcastle,

I think I understand your question.

Basically you want to know how you can use ROS to move your robot (real or in a simulated environment). At first let me say you that, despite what many people here would say, you'll never find this answer through the ROS tutorials. because the ROS tutorial tells you how you could write a specific algorithm using ROS or how to deal with a specific ROS library, but they never tell you how to setup your robot. Basically if you want to use ROS you should already have some knowledge about robots, meant as a system of sensors, controllers, communication and automated systems...and which criteria you need for your robot to work. In this case I mean: what is a pose, an orientation, a vector speed, an odometry information referred to a know position, position, or how to derive it from the environment. Once you get familiar with those terms and concepts, then you can try to use ROS as a communication systems based on nodes and topics and brings the whole concept expressed above in a abstracter level, letting all those robots functionalities working together.

Now...said that... I want to give you a more real answer to your question given a specific case.

  1. Case REAL: in this case you have already an existing robots, which (since you didn't specify it I assume it is a wheeled robots like a sumovore) has encoders attached on its wheels. The values coming from the sensors must be sent through the topic structure provided by ROS to the corresponding program. The program will be able to convert the angle read from the encoders into a path and running relatively fast in your PC it will knows every time where it is. Pay attention that in this case you should be familiar with the concept of dead reckoning, which (as I said before) is it presumed to be already know if you want to develop a robot.

  2. Case SIMULATION: in this case you are interested in, for example, move your robot around in RViz or Gazebo reading, for example, the position from a gamepad or Joystick. Furthermore you can attached virtual sensors to you robot and get a map of the enviroment: the robot will moved based on this information. Assumed you already know how to calculate a position of the robot, then you can simply broadcast this information though ROS using a particular ROS broadcaster, which will send the movement of your robot (referred as a robot transformation) through the ROS system. A very bare bone example can you find here. ANYWAY... in case you are going to simulate your robot, I strongly suggest you to buy or get the following book: ROS by Example I. It has been written for people who want to build up their robot and let him moving in RViz. Even if you are many times in the book suggested to get back to the tutorials, and that can sound at the beginning confusingly, you need just to understand the idea behind and how to translate it in a working concept using ROS. With the ROS tutorials alone, you'll never get the wanted answer;

That's all for the moment. Please, take it with a grain of salt, and try to understand basically what you need, what you want, and what target you are supposed to reached. Robotics is a huge and wide spread topic, it is not possible to answer shortly to your question. All the exampled I explained are just a 0.00000001% of the whole range of possibilities and robot configurations. I depicted just a very easy and common situation where you want to move small wheeled robot and never talked, for example, about sensors or other navigation possibilities.

I hope it helps.