jeudi 3 septembre 2020

Random Pathgeneration of Robotics Movement

I am trying to write a program, that can give me Degree values for the motors of a snake-like robot, when trying to reach a point with the last two ends of the snake. The approach is similar to the RRT generation idea.

In order to do that I have written a simulation function with dependencies of how the 'snake' would move. Therefore, position of each joint can be assumed, when specific degrees are given.

Then I am generating degrees in a specific range for each joint-degree combination. The degree combination list of the snake-end-points, which are the closest to the wanted endpoints are being taken for the next round.

From each best-degree a middle value is taken to make sure the all possible best-degree-values are being taking into account.

Idea:

function:
INPUT: Some degree Values(for each joint-degree combination)
OUTPUT: 3D coordinates of all joint points

Wanted:
OUTPUT(last two coordinates) should be exact the same values as entered
- > find degree Values accordingly 

Approach is to get the best Variable-Inputvalues for a function, that gives back coordinates, which should be as close as possible to set values.

Example of procedure(with just one joint)

Devision = 2
List = [0,90,180]
1.'calculation of the snake-endpoints from all given values'(0,90,180)
2.'degree with smallest distance to wanted endvalues are being taken'(ex. Deg 90 was the best)
3.'distance between list elements is calculated'(in this case 90 - 0 = 90)

4. First value calculation(minus best): bestValues(deg 90) - distance(90)/Devision(2) -> 45
5. Second value calculation(plus best): bestValues(deg 90) + distance(90)/Devision(2) -> 135
6. New List can be created: [First value, best, Second value] -> [45,90,135]

The idea is to determine one possible best degree for each joint, that is being calculated through exclusion of best values.

Problem with that is the misinterpretation of calculated endpoints. I think that I am actually rejecting some values in a range as I don't have the middle values. Therefore I am getting wrong results and the solution doesn't give me a degree values for exact the point I have wanted.

Sure I could add some more devision Values inbetween, but that would take for ever to calculate.

If someone finds the mistakes in my thoughtapproach or knows a different direction I could go instead (ex. Library), I would be really glad.

Also: please remind me if I am missing some information here.




Aucun commentaire:

Enregistrer un commentaire