Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segment fault on 32-bit machine #459

Merged
merged 8 commits into from
Aug 21, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
* Changed interface for TrajectoryPostProcessor: [#341](https://github.com/personalrobotics/aikido/pull/341)
* Planning calls with InverseKinematicsSampleable constraints explicitly set MetaSkeleton to solve IK with: [#379](https://github.com/personalrobotics/aikido/pull/379)
* Added a kinodynamic timer that generates a time-optimal smooth trajectory without completely stopping at each waypoint: [#443](https://github.com/personalrobotics/aikido/pull/443)
* Fixed segment fault on 32 bit machine in vector-field planner: [#459](https://github.com/personalrobotics/aikido/pull/459)

* Robot

Expand Down
9 changes: 5 additions & 4 deletions src/planner/vectorfield/detail/VectorFieldIntegrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ VectorFieldIntegrator::VectorFieldIntegrator(
double checkConstraintResolution)
: mVectorField(vectorField)
, mConstraint(collisionFreeConstraint)
, mCacheIndex(-1)
, mDimension(mVectorField->getStateSpace()->getDimension())
, mTimelimit(timelimit)
, mConstraintCheckResolution(checkConstraintResolution)
, mState(mVectorField->getStateSpace()->createState())
, mLastEvaluationTime(0.0)
{
mCacheIndex = -1;
mLastEvaluationTime = 0.0;
mDimension = mVectorField->getStateSpace()->getDimension();
mState = mVectorField->getStateSpace()->createState();
// Do Nothing
}

//==============================================================================
Expand Down
2 changes: 1 addition & 1 deletion src/planner/vectorfield/detail/VectorFieldIntegrator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class VectorFieldIntegrator
double mConstraintCheckResolution;

/// Current state in integration
aikido::statespace::StateSpace::State* mState;
aikido::statespace::StateSpace::ScopedState mState;

/// Last evaluation time in checking trajectory
double mLastEvaluationTime;
Expand Down
12 changes: 6 additions & 6 deletions tests/planner/vectorfield/test_VectorFieldPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,10 @@ TEST_F(VectorFieldPlannerTest, PlanToEndEffectorOffsetTest)

double positionTolerance = 0.01;
double angularTolerance = 0.15;
double initialStepSize = 0.001;
double initialStepSize = 0.01;
double jointLimitTolerance = 1e-3;
double constraintCheckResolution = 1e-3;
std::chrono::duration<double> timelimit(10.0);
double constraintCheckResolution = 1e-2;
std::chrono::duration<double> timelimit(60.0);

// Create problem.
auto offsetProblem = ConfigurationToEndEffectorOffset(
Expand Down Expand Up @@ -453,9 +453,9 @@ TEST_F(VectorFieldPlannerTest, PlanToEndEffectorPoseTest)
double poseErrorTolerance = 0.01;
double initialStepSize = 0.05;
double r = 1.0;
double jointLimitTolerance = 1e-3;
double constraintCheckResolution = 1e-3;
std::chrono::duration<double> timelimit(5.);
double jointLimitTolerance = 1e-2;
double constraintCheckResolution = 1e-2;
std::chrono::duration<double> timelimit(300.);

mSkel->setPositions(mStartConfig);

Expand Down