GCC warning for motion profile generate path

Hey guys,

I was trying to use the motion profile in the okapi library and noticed I got a warning when I tried to build my project. It says:

parameter passing for argument of type ‘std::initialized_listokapi::Point’ changed in gcc 7.1

And when I try to run the code I get a memory permission error.
Does this imply that I need to update my gcc?

Has anyone else experienced this and found a solution?


1 Like

Memory errors generally have little to do with compilers.

1 Like

ok so that fixed the warning but I still get the memory permission error. Is there a way to update the gcc?


I too am having the same memory permission error, but only when I add in the motion profile!

memory permission error probably has nothing to do with the compiler.

1 Like

The segfault is probably cause by either having an impossible path (remember, no sharp corners or backwards movements) or having too many paths.

1 Like

After downloading the toolchain and replacing my current toolchain folder with that toolchain folder im still getting the memory permission error. Does this mean that there is something wrong in the way I am declaring my motion profile controller?

I declare my Chassis as below outside of the autonomous

auto Autodrive = ChassisControllerFactory::create
{4_in, 15_in}

and my path generate inside my autonomous is:

Point{0_ft, 0_ft, 0_deg},
Point{3_ft, 0_ft, 0_deg}
}, “A”

is that correct or is there a better way to do the motion profile?

oh and my motion profile controller is also declared outside my autonomous as below:

auto baseMPController = AsyncControllerFactory::motionProfile(1.0, 2.0, 10.0, Autodrive);

sorry my english is poor.
I don’t use okapilib either.
I’ve seen this question in the forum before. I suggest asking the author.
Is okapilib Built-in route planning? A* algorithm?

Not a star. A star is good for high level planning but doesn’t generate a motion profile like what is required for a Vex Robot.

All good. Yea the motion profile is used for the robot to follow a path given by xy coordinates and an angle. I was actually able to get it to work thanks for the help!

Thanks everyone for the help! I was actually able to get it to work.

I moved my chassisControllerFactory and AsyncControllerFactory to be created in a functions file and then in that functions file I made a function in which I generated the path and set the target.

In my autonomous file I just call the function that generates the path and sets the target.

That made the motion profile work and got rid of the memory permission error. I’m not 100% sure why but it worked. If anyone knows why it worked I would love to deepen my understanding.

Thanks again!

I wrote odometers for students
I don’t know how to adjust the sensor accurately. It often leads to errors in odometer.
Students are reluctant to use it.:joy:
The vex path is relatively simple. There’s no need for astar.
If astar is used, it seems that a special controller has to be written for astar.
Traditional controllers can cause stutters .

Ho w many path you can able to write it? Can you able to maintain same speed in every path?

I’ve only written 2 paths but I assume there is no limitation on the number of paths. I think shorter paths have slower speeds but most paths are the same speed.