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
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
- python how to write list of lists to file
- Removing URL features from tokens in NLTK
- Optimizing for Social Leaderboards
- Python : Get size of string in bytes
- What is the code of the sorted function?
Related Questions in GEOMETRY
- Generating a sphere in OpenGL without high level libraries - what's wrong with my code?
- Matrix (?) to Rectangle and vise versa
- Turn a button into a loading circle animation
- Find a longitude given a pair of (lat,long) and an offset latitude
- 2D perspective transform in JavaScript
- how to convert Oracle geometry to SQL GEOMETRY
- Overlapping Rectangles Javascript
- Detect hole in geometry
- Reversing RotateAxisAngle back to angles
- WPF: 2 string.format in the same TextBlock?
- Quaternion to EulerXYZ, how to differentiate the negative and positive quaternion
- How to find a point given its distance from two other points?
- Ray/Rectangle intersection in 3D space
- Pairs of points on a graph
- Android OpenCV Detecting Circles takes too much FPS
Related Questions in MICROPYTHON
- ESP8266 Micropython - connecting to University Wi-fi ( WPA2 Enterprise PEAP )
- Are there event callbacks in BBC MicroPython?
- Connecting ESP8266 to IBM Watson with Micropython
- Mount NodeMCU with Micropython filesystem?
- I2C scan with Micropython and NodeMCU 12E returns empty list
- ESP8226 micropython ssl connection issue with SMTP
- Load and compile python file without system file with MicroPython
- getting OSError -202 where running urequests.get from micropy
- Embed aws iot device sdk to Micropython as user C module
- TouchPad Error while reading pin 2 of esp32
- MicroPython: OSError: [Errno 19] ENODEV
- How to execute functions remotely on micropython
- installing micropython library (BNO055/IMU) properly
- MicroPython makes the ESP32 freeze
- Can not read data from uart with micropython and SIM7070G NB on ESP32 controller
Related Questions in LEGO-MINDSTORMS-EV3
- Counting lines with lego mindstorms ev3?
- Lego mindstorms ev3 colour sensor always in reflect mode
- Mindstorms EV3 (Micro Python) - Motor.run() not working
- Send Data between EV3 and PC
- Trying to get a photoresistor to take an analog reading through a wire command to an EV3
- How do I get my code to loop until I press a button (Lego EV3)
- How can Mindstorms EV3 communicate with my PC via Bluetooth?
- arm-linux-gnueabi-g++: .so file not recognized
- Problem with Python and the LegoMindstorms when try to use "print()"
- remote debugging EV3 using gdbserver fails
- I cant set the reset_angle parameter to false in the EV3 using micropythons , im using VSC
- Sending commands from a windows laptop to micropython ev3 using Python
- controlling EV3 motor using Matlab
- Where is the realization of interface located in python module?
- Drive function in MicroPython for LEGO 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 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.