Editing
Software Onboarding/Inverse kinematics
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Single Wheeled Robot= {{Template:todo|Split into relative movements and state aware ik}} {| class="wikitable" style="float:right;line-height:1.5em" | {| [[Image:One wheel ik.png||One wheeled robot]] | One wheeled robot at the origin |} |} The simplest case of inverse kinematics is driving a single wheeled robot on a number line. The robot is capable of being commanded to spin its wheel at a specific speed (positive speeds will cause it to move right, negative speeds will cause it to move left), but we'd like to be able to command it to move to a specific position. To do so will require us to compute a sequence of motor speeds that, when executed by the robot, will move it to the desired target position. There are infinitely many sequences that get us from point A to point B, but we're only interested in the most direct route. There are only two things we have control over. How fast the wheel spins, and how long it spins. This is enough control to get us anywhere on the line. If we want to move to position 4, we need to move the robot at 1 unit per second in the right direction for four seconds. ==Exercise== {{Template:todo|Flesh out this exercise}} Create a function that drives the create forward or backward to a target position. Don't worry about turning the robot, just drive both motors at the same speed. Assume that the robot is at the origin when the function is called. def drive_distance(distance, time): pass <div class="toccolours mw-collapsible mw-collapsed" style="width:400px; overflow:auto;"> <div style="font-weight:bold;line-height:1.6;">Solution</div> <div class="mw-collapsible-content"> Solution goes here </div></div>
Summary:
Please note that all contributions to LairWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
LairWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information