Simulation
In this chapter, I will give an overview of simulation and writing simulation code in Python.
What you will learn
- How to determine the correct level of abstraction for simulation
- How to write simulation code in Python
Terminology
- analytical model (closed-form)
- a model that can be computed exactly
- numerical model
- a model that must be computed approximately (and typically iteratively)
Lecture
Links
Simulation introduction
Writing simulation code
I use Watchexec to rerun my Python script on save. Here is a direct link to the simulation script.
Interactive
You will find a reasonable introduction to simulation on my Simulation in Evolutionary Robotics tutorial website.
Exercise
You will submit your responses on gradescope. Only one partner should submit. The submitter will add the other partner through the gradescope interface.
Additional details for using gradescope can be found here:
You should open the gradescope assignment now so that you know what to work complete.
Grading
I will grade all exercises using a scale of “Nailed It” / “Not Yet”. See the course grading policy for more information, and check gradescope for deadlines.
Overview
The goal for this exercise is to write a simulation (in a language of your choice) that simulates your robot moving through a sequence of waypoints. You can use my example code as a starting point, or you can write yours from scratch. Your simulation must include the following:
- forward kinematics
- position control
- at least five waypoints
- plotting
You will need to upload your code and a figure to gradescope.
Wrap-Up
In the next chapter, you will build on this simulation to make your robot navigate a pre-planned path.
Resources
- Gazebo
- CoppeliaSim (V-REP replacement)
- Webots
- Isaac Sim
- Vortex Studio
- Drake
- RoboDK
- MARS
- Simscape Multibody
- RaiSim