element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Robotics
  • Technologies
  • More
Robotics
Blog Building a Robot! (Simulated)
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Robotics to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 12 Nov 2015 6:33 PM Date Created
  • Views 1880 views
  • Likes 9 likes
  • Comments 24 comments
  • simulation
  • robotics
  • gazebo
Related
Recommended

Building a Robot! (Simulated)

shabaz
shabaz
12 Nov 2015

After having built a couple of small wheeled platforms (a crude attempt called XMP-1 and a slightly better one called XMP-2) I was curious what simulation tools were out there specifically geared toward robotics design.

This is just a quick summary of one of the simulation tools that are available, called Gazebo.

 

Gazebo was incredibly easy to get going – a single command line will install it onto Linux, and when run it is easy to add bits and pieces from the toolbar and get going.

I’ve yet to work through the tutorials but I’m hoping to eventually simulate XMP-2 so I can write better code easily.

 

Here is a screenshot of Gazebo, and a quick video showing some basic physics, pushing the robot into coke cans.

image

 

Video:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

More complex movements are possible too. Here is a robot gripper with torque being applied to part of it:

image

Video:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

The simulation includes gravity and friction and many attributes are configurable.

The models can be created in XML files, and the tutorials look comprehensive.

The example below from a tutorial shows a snippet of a robot, where a box-shaped chassis is needed. The <pose> element contains the position (xyz, and orientation in three dimensions). The <collision> and <geometry> elements contain a <box> element which defines a box of size 0.4x0.2x0.1m in this example.

Usually they are the same; one element is used for the graphics, and the other is for the collision-detection algorithm to use.

image

 

The simulation can be connected up to real hardware or software through the use of an application programming interface (API), so it is possible to test robotics software before you've built the hardware, or you can interface your sensors and start programming movements.

It all looks extremely interesting!

Check out the second part by clicking here, which goes into detail about how to construct a model (based on a real hardware robot called XMP-2) and how to control it using external stimulus.

  • Sign in to reply

Top Comments

  • DAB
    DAB over 9 years ago +1
    I agree. I was not aware that Gazebo existed, but it definitely looks interesting to look at mechanical designs. I will add it to my list of tools to check out. Thanks, DAB
  • shabaz
    shabaz over 9 years ago +1
    Hi Shabaz! Really, thank you to point on this. It seems very good. At the moment I am working on the following "robotizations" Camera slider with controller and horizontal programmable movement; camera…
  • balearicdynamics
    balearicdynamics over 9 years ago in reply to shabaz +1
    Hello Shabaz! Many thanks for the update. In the meantime I am installing the software that is really intriguing. I'm going to try and understand how to produce a simple single mechanical movement or linkage…
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to shabaz

    Thank you Shabaz, got it. All is clear now. I will try to make some tests as I am outside a couple of super-busy weeks.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 8 years ago in reply to balearicdynamics

    Hi Enrico!

     

    (On mobile keypad so will keep this short) the system allows for complete software simulation, or you can inject stimulus from a second process (I did that with a file just as a test) and that means it is possible to inject some stimulus from the outside world if you wish to. It is not necessary, but could be interesting sometimes to see the effect in the virtual world if (say) the robot encounters sensor stimulus from the outside world, etc.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to shabaz

    Shabaz, you response is really helpful but I have a strange perception, just based on your experience. It seems that this system (say) can - in someway with a file or something else - will receive the physical behaviour and compare it with the model. That's great but what about controlling the physical stuff in a testing environment to adhere it to the model? Is this possible? Has this a sense ?

    I mean, in the case Physical Vs Simulation, this means that you have already built the hardware... Almost late to review the project, in theory based on the simulation model. There is a bit of confusion on this part or I am wrong ?

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 8 years ago in reply to balearicdynamics

    Good point, I'm not sure if a standard exists!

    Gazebo doesn't have a direct hardware API (from what I can tell) just a software interfacing API, so on Linux possibly the easiest way is to either use a USB attached device like a serial port, and then have a short custom program to read from (say) /dev/ttyUSB0 (or whatever the USB serial enumerated as), and then based on the read value, either write a command to a file (using usual file write API in the programming language chosen), or instead have some nicer communication scheme, I just used the file write method above because it was quickest for the test.

     

    So, the hardware would need (say) Arduino or something to translate the buttons/sensors etc and if desired any outputs (e.g. real motors to compare the simulation to the real world response) to the serial UART.

     

    It would be interesting to have a standard for robotics inputs and outputs, like event time and end of event to capture durations as well.

    Maybe this sort of thing exists, ordinarily of course the control is a tight processing path in a microcontroller, from input hardware (button, sensor etc) processed through to output device (motor, servo), but here this is not the case since we want to pass it into the simulation!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 8 years ago in reply to shabaz

    What sounds strange to me (100% ignorant) is how can I interface hardware. Should be followed some kind of standard? What if a custom hardware is used, as usually occur on specific development projects? I am curious to this aspect.

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube