Motion Profiling

Hi, recently I implemented the motion profiling method for our autonomous, and I was just wondering how the robot would move when the generated path was from
{0_in, 0_in, 0_deg} to {3_in, 3_in, 0_deg}.

From my understanding, the x value moves the robot forward and backward, but what does the y value do with respect to the movement?

The y value moves the robot left to right. (Not up and down :laughing:)

1 Like

But how would the robot move horizontally when the motors are powering the robot in a vertical direction?

The robot moves in an S-shape to reach the specified point, or can simply turn to face it, then drive to it (turning back at the end of the maneuver).

1 Like

Then what’s the difference between the y value parameter and the deg parameter?

The degree parameter specifies the orentation of the robot at the end of the maneuver, with reference to the field.

1 Like

If you were to remove previous profiles during autonomous and add new ones that were previously generated, do you need a new profile controller or can you do that with the same profile controller?

I’m not sure exactly what you’re asking, but I would say with the same profile controller.

I think he means if he can delete and make more paths with the same controller

EDIT: if that was ur question, the answer is yes

1 Like

Yes;
Also, can I pre-generate paths during void initialize() ?

Yes you can, I would also recommend doing that as it conserves resources and saves time during the Auton Period

1 Like

Would you recommend pre-generating them in initialize() or competition_initialize()?

Another thing, is the turning clockwise or counter-clockwise in default?

A) Personally just use initialize, not sure what competition initialize actually does or how it’s different

B) I’m fairly certain that they are clockwise but I don’t use Motion Profiling for turns so I could be wrong

1 Like

When generating a new path based on the first path’s location, does the starting point have to be the coordinates for the first path?
Ex.

profileControllerA->generatePath({{0_in, 0_in, 0_deg}, {50_in, 0_in, 0_deg}}, "A"); 
profileControllerB->generatePath({{0_in, 0_in, 0_deg}, {0_in, 0_in, 45_deg}}, "B");

If I were to generate path B right after path A’s movement, would the starting point of path B have to be the end point of path A?

That’s not what I do, always reset that position to 0

So if I were to move a robot a certain distance forward then point turn the robot, would these path setups work?

profileController->generatePath({{0_in, 0_in, 0_deg}, {50_in, 0_in, 0_deg}}, "A");
profileController->generatePath({{50_in, 0_in, 0_deg}, {50_in, 0_in, 45_deg}}, "B");

I haven’t been able to successfully point-turn with profiling but ig it looks promising… lemme try this code on my bot later today and get back to u on that with say a vid.

okay, thanks for the support!

You cannot do a point turn using OkapiLib’s motion profiling (because pathfinder can’t generate negative wheel velocities).

5 Likes