i have a Mindstorms robot that has back/forward facing wheels and a motor in front that moves a stick left and right (circular motion) and i want the left and right motion of the end of the stick to be linear. i want to achieve this by correcting the circular motion using the back/forward motion. here is a picture for referencepicture If you knowany formulas or proceses let me know. thanx in adwance
Convert circular motion and back and forward linear motion to sideways linear motion
282 Views Asked by Gapi505 At
1
There are 1 best solutions below
Related Questions in PYTHON
- How to store a date/time in sqlite (or something similar to a date)
- Instagrapi recently showing HTTPError and UnknownError
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Python Geopandas unable to convert latitude longitude to points
- Influence of Unused FFN on Model Accuracy in PyTorch
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Conda has two different python binarys (python and python3) with the same version for a single environment. Why?
- Problem with add new attribute in table with BOTO3 on python
- Can't install packages in python conda environment
- Setting diagonal of a matrix to zero
- List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
- Basic Python Question: Shortening If Statements
- Python and regex, can't understand why some words are left out of the match
Related Questions in GEOMETRY
- WorldToScreen function
- Intersection of Cartesian Box and Polygon in 3D
- find point in inside polygon ..with mysql
- How do I find the line segments formed by the meeting of two sides of two polygons?
- How to create a pareto distribution prediction function?
- How to estimate the memory size of a binary voxelized geometry?
- Spacing out overlapping rectangles: how to translate pseudocode?
- Sympy manipulation of wedge products
- how to create a sector and check if some point is in it's area?
- Get third control point quadratic Bezier curve for parabola with given fucus and directrix, Lua
- CGSRegionRef: How is an arbitrary region represented as union of rects?
- Distribution of n number of equi-distant point in polygon
- Selecting suitable triangles to intersect with a line
- How to distribute n number of points into a svg polygon javascript
- How to offset a shaply polygon without chnaging corner shape
Related Questions in MICROPYTHON
- trouble with creating a project for Pymakr in vscode
- Micropython: _thread module imported but not showing methods
- Using MAX 9814 PCM data to create a .WAV file
- X is not defined but x has been defined
- Does any wasm runtime has a support for micropython (For RPI_PICO board)
- Is there a way to read serial input and run multple functions while retaining memory?
- OSError: [Errno 1] EPERM connecting to WLAN on Raspberry Pi Pico W
- Printing an exception that works on Micropython/CircuitPython AND desktop python
- Buffersize to small
- MicroPython Socket sends strings without encoding
- How to extract access token from redirect URL without full libraries?
- Is utime.ticks_diff() safe to run in a ISR?
- How can I fix that my variable goes into the formatted string of my html code in python
- Typing a class decorator
- Problem in connecting esp32 to local MQTT broker
Related Questions in LEGO-MINDSTORMS-EV3
- playing sounds using EV3DEV without ev3dev2 in micropython
- A star Pathfinding algorithm with Lego Mindstorms ev3
- Mindstorms EV3 (Micro Python) - Motor.run() not working
- Lego mindstorms ev3 colour sensor always in reflect mode
- Counting lines with lego mindstorms ev3?
- connection denied when trying to connect to ev3dev
- Error building LEGO Mindstorms EV3 project in MATLAB / Simulink on Linux
- How to loop a thread in ev3dev(Python)
- How to control Hitechnic motors with ev3 brick
- LEGO EV3: unsupported operand type(s) for *: 'NoneType' and 'NoneType'
- Problem running ev3dev on visual studio code
- I can't install python libraries with sudo easy_install3 on ev3dev
- I cant set the reset_angle parameter to false in the EV3 using micropythons , im using VSC
- Cross compile shared library for armv5te-unknown-linux-gnueabi Rust [Mindstorm Ev3dev]
- Lego Mindstorms - Server Client messaging between PC and Ev3
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
First, let's make a more mathematical drawing of the problem. The half of a circle is the possible path your stick can have, assuming that the robot is static. The radius of this circle, h, is the length of you stick. Point A is the starting position of the stick, point B is the ending position of the stick. Corner α is its starting angle and corner β is its ending angle, both measured from the x-axis.
In this picture, x is the difference in the x-axis between the two positions of the stick. It is thus the distance that the robot needs to compensate by driving backwards and so the target of our calculation.
In order to calculate x, we need the difference of the two x-coordinates of the stick's positions. In math language, this becomes:
Note that
|EC|means the length of segment[EC].Now we only need to calculate
|EC|and|ED|. This can be done using the cosine function. The cosine function calculates the ratio of the apothema of a triangle and the side adjacent to the corner chosen in a right-angled triangle. For more information, see Wikipedia.If you do know the angles already, its fairly simple from here. In triangle
EDA, we can state that:In triangle
ECB, we can state that:We can reform the equations to:
and:
Then, if we fill in the first equation, then we get:
Note that you might have form the angles in the correct form, as they might not be measured from the x-axis.
But if we don't know the angles yet, we need to calculate them first. Then we need to know
|AD|and|BC|, which is the distance between the center of the robot and the position we want to reach.This time we will have to use the sine function, which is the ratio of the apothema of a triangle and the side opposite to the corner chosen in a right-angled triangle.
In triangle
EDA, we can state that:And in triangle
ECB, we can state that:This means that we can use the arcsine function, usually denoted as
sin⁻¹ x. It calculates the angle which has cosine x.If we reform the equations, we get:
And:
Using these values, we can uses the formula above to calculate x.