0

Rosanswers logo

Hi. I am interested in using ROS for some of my projects, but at the moment I do not have any equipment to work with. The robots that ROS supports at the moment are a little beyond my budget. And to be honest, I want to be confident in my knowledge of ROS before I go about spending money on a robot to use with ROS.

So I was wondering if, it is possible to learn how to use ROS without access to any physical hardware other than a desktop computer? Like for example, would I be able to write programs in C++ or Python to control virtual robots and simulate them in ROS? That way, I can learn ROS and when I do eventually get access to physical hardware, I can transfer the code to it and control it..

I hope I haven't been too vague. Thanks.


Originally posted by cassander on ROS Answers with karma: 121 on 2012-02-19

Post score: 1

2 Answers2

0

Rosanswers logo

You are looking for this: http://ros.org/wiki/pr2_simulator


Originally posted by dornhege with karma: 31395 on 2012-02-19

This answer was NOT ACCEPTED on the original site

Post score: 3

0

Rosanswers logo

As @Dornhege mentioned, you can use the PR2 in simulation, but being a complex robot, simulation might be rather slow and it can be hard to get a good overview. You might also want to have a look at the simulated turtlebot provided via the turtlebot_gazebo package, which provides a good example of a simpler robot, which still demonstrates a lot of concepts. You can directly launch the simulated turtlebot with the command

roslaunch turtlebot_gazebo  turtlebot_empty_world.launch

once you have the package (and all dependencies) installed. Another good starting point could be the erratic_robot stack, but I believe turtlebot is better documented and more widely used now.

You might also want to have a look at these related questions: 1, 2.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2012-02-19

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by cassander on 2012-02-19:
How is it possible to simulate a complex robot like the PR2, which has many different sensors and actuators? Is each and every sensor and actuator simulated independently? I know it is slow and the simulation might not be accurate but it is the next best thing compared to actually owning the robot.

Comment by Stefan Kohlbrecher on 2012-02-19:
Try running "roslaunch pr2_gazebo pr2_wg_world.launch", this launches the PR2 in the Willow Garage world. Sensors and actuators are simulated independently and the robot model is defined using the URDF format (you can look that up on the ROS wiki).

Comment by cassander on 2012-02-20:
When you say the sensors and actuators are simulated independently, you mean to say that I can write code to send data or receive data from and to the virtual sensors and actuators? Ofcourse, in this case, I suppose the sensors will produce data about the virtual world.I will try the command. Thanks

Comment by Stefan Kohlbrecher on 2012-02-20:
Yes, ideally the simulated components have the same ROS API in simulation or real hardware and it's transparent to the user what is actually used. I recommend a look at the URDF tutorials: http://www.ros.org/wiki/urdf/Tutorials, especially the "gazebo extensions" section.

Stefan Kohlbrecher
  • 8,949
  • 1
  • 1
  • 2