Skip to content

Commit

Permalink
improve diagnosability
Browse files Browse the repository at this point in the history
  • Loading branch information
Kei Usui committed Jan 16, 2024
1 parent f41199c commit 6b25620
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libopenrave-core/generictrajectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1717,8 +1717,8 @@ class GenericTrajectory : public TrajectoryBase
{
BOOST_ASSERT(_bInit);
BOOST_ASSERT(_timeoffset>=0);
BOOST_ASSERT(startTime>=0);
BOOST_ASSERT(stopTime>=startTime);
OPENRAVE_ASSERT_OP_FORMAT0(startTime,>=,0, "start time needs to be non-negative", ORE_InvalidArguments);
OPENRAVE_ASSERT_OP_FORMAT0(stopTime,>=,startTime, "stop time needs to be at least start time", ORE_InvalidArguments);

_ComputeInternal();
OPENRAVE_ASSERT_OP_FORMAT0((int)_vtrajdata.size(),>=,_spec.GetDOF(), "trajectory needs at least one point to sample from", ORE_InvalidArguments);
Expand All @@ -1727,7 +1727,7 @@ class GenericTrajectory : public TrajectoryBase
}

const dReal trajDuration = GetDuration();
BOOST_ASSERT(trajDuration>=stopTime);
OPENRAVE_ASSERT_OP_FORMAT0(trajDuration,>=,stopTime, "stop time needs to be at most trajectory duration", ORE_InvalidArguments);
int numPoints = 0;
{
const dReal duration = stopTime - startTime;
Expand Down

0 comments on commit 6b25620

Please sign in to comment.