rdiankov / openrave

Open Robotics Automation Virtual Environment: An environment for testing, developing, and deploying robotics motion planning algorithms.
http://www.openrave.org
Other
706 stars 344 forks source link

Add reserve to TrajectoryBase #1388

Closed snozawa closed 4 months ago

snozawa commented 4 months ago

Summary

rdiankov commented 4 months ago

@snozawa I understand the need. But in the interest of keeping the API clean and not having to worry about calling Reserve after Init is called, how about adding a second parameter to TrajectoryBase::Init instead, which will only allow the user to reserve the points on initialization of the trajectory?

snozawa commented 4 months ago

@snozawa I understand the need. But in the interest of keeping the API clean and not having to worry about calling Reserve after Init is called, how about adding a second parameter to TrajectoryBase::Init instead, which will only allow the user to reserve the points on initialization of the trajectory?

thanks for your comment! That makes sense! I updated Init function to support reserving of memory, and by default, reserving is disabled.

rdiankov commented 4 months ago

Thanks!