-
Notifications
You must be signed in to change notification settings - Fork 30
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
Adding an abstract BarrettHandPositionCommandExecutor class #166
Conversation
…rsonalrobotics/aikido into SimBarrettHandCommandExecutor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a few comments.
Out of curiosity: The abstraction is done only for BarrettHandPositionCommandExecutor
. Will you abstract BarrettFinger*CommandExecutor
as well in separate PRs?
if (mInExecution) | ||
throw std::runtime_error("Another command in execution."); | ||
|
||
mPromise.reset(new std::promise<void>()); | ||
mProximalGoalPositions = _positions.topRows(3); | ||
mProximalGoalPositions = _positions.topRows(3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Let's use _positions.head<3>()
.
if (mInExecution) | ||
throw std::runtime_error("Another command in execution."); | ||
|
||
mPromise.reset(new std::promise<void>()); | ||
mProximalGoalPositions = _positions.topRows(3); | ||
mProximalGoalPositions = _positions.topRows(3); | ||
mSpreadGoalPosition = _positions(3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Let's use brackets for indexing vector.
Eigen::Matrix<double, 4, 1> _goalPositions, | ||
::dart::collision::CollisionGroupPtr _collideWith); | ||
virtual std::future<void> execute( | ||
Eigen::Matrix<double, 4, 1> goalPositions) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Let's use const Eigen::Vector4d&
to avoid the unnecessary copy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, make this an Eigen::VectorXd
since this is now a generic interface - potentially for hardware other than the BarrettHand. E.g. we might decide to use a similar interface for the pan-tilt unit.
Also, passing a fixed-size Eigen::Matrix
by value is wrong because the argument may have incorrect alignment. This is more than a nit. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 if this is generic for arbitrary dofs. I assumed this class is generic only for Barrett Hand, which I believe the dimension of configuration is four.
/// spreads of the fingers. | ||
/// \param _collideWith CollisionGroup to check collision with fingers. | ||
SimBarrettHandPositionCommandExecutor( | ||
std::array<SimBarrettFingerPositionCommandExecutorPtr, 3> _positionCommandExecutors, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: const std::array<SimBarrettFingerPositionCommandExecutorPtr, 3>&
#include <thread> | ||
|
||
namespace aikido{ | ||
namespace control{ | ||
|
||
//============================================================================= | ||
BarrettFingerPositionCommandExecutor::BarrettFingerPositionCommandExecutor( | ||
SimBarrettFingerPositionCommandExecutor::SimBarrettFingerPositionCommandExecutor( | ||
::dart::dynamics::ChainPtr _finger, int _proximal, int _distal, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We could use std::size_t
instead of int
to avoid unnecessary static cast.
if (mInExecution) | ||
return false; | ||
|
||
mCollideWith = collideWith; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: mCollideWith = std::move(collideWith);
@@ -153,7 +156,7 @@ void BarrettFingerPositionCommandExecutor::step(double _timeSincePreviousCall) | |||
if (mDistalOnly) | |||
return; | |||
|
|||
// Check proximal collision | |||
// Check proximal collision | |||
bool proximalCollision = mCollisionDetector->collide( | |||
mProximalCollisionGroup.get(), mCollideWith.get(), | |||
mCollisionOptions, &collisionResult); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not added by this PR, but we don't need to pass the collision result parameter since we only check whether there is a collision or not. By passing nullptr
(or not passing), we could save time to compute the exact contact information such as point, normal, and penetration depth.
bool setCollideWith(::dart::collision::CollisionGroupPtr collideWith); | ||
|
||
private: | ||
constexpr static double kMimicRatio = 0.333; | ||
constexpr static double kProximalVelocity = 0.01; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not added in this PR, but renaming kProximalVelocity
to kProximalSpeed
would make more sense since the use of this value seems the value doesn't encode the direction of motion.
bool setCollideWith(::dart::collision::CollisionGroupPtr collideWith); | ||
|
||
private: | ||
constexpr static double kMimicRatio = 0.333; | ||
constexpr static double kProximalVelocity = 0.01; | ||
constexpr static double kDistalVelocity = kProximalVelocity*kMimicRatio; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
@@ -39,6 +41,10 @@ BarrettFingerPositionCommandExecutor::BarrettFingerPositionCommandExecutor( | |||
if (!mCollisionDetector) | |||
throw std::invalid_argument("CollisionDetctor is null."); | |||
|
|||
if (!mCollideWith) | |||
throw std::invalid_argument("CollideWith is null."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we assume mCollideWith
is always not null, then we might don't need to pass the collision detector because mCollideWith
has its collision detector in it (we can use it instead). Moreover, the collision detector of mCollideWith
and _collisionDetector
should be the same to perform collision detection anyway so not passing additional collision detector would reduce the possibility of mistake.
FYI, the collision detection between two collision groups can be done as
bool collision = mSpreadCollisionGroup->collide(mCollideWith.get(),
mCollisionOptions, &collisionResult);
|
||
/// Returns mimic ratio, i.e. how much the distal joint moves relative to | ||
/// Returns mimic ratio, i.e. how much the distal joint moves relative to | ||
/// the proximal joint. The joint movements follow | ||
/// this ratio only when both joints are moving. | ||
/// \return mimic ratio. | ||
static double getMimicRatio(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We could make this constexpr
in this PR or leave a note as a todo.
/// Assumes that fingers are underactuated: proximal joint is actuated | ||
/// and distal joint moves with certain mimic ratio until collision. | ||
/// If | ||
/// Abstract class for position commands for a Barrett Hand. | ||
class BarrettHandPositionCommandExecutor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to PositionCommandExecutor
.
Eigen::Matrix<double, 4, 1> _goalPositions, | ||
::dart::collision::CollisionGroupPtr _collideWith); | ||
virtual std::future<void> execute( | ||
Eigen::Matrix<double, 4, 1> goalPositions) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, make this an Eigen::VectorXd
since this is now a generic interface - potentially for hardware other than the BarrettHand. E.g. we might decide to use a similar interface for the pan-tilt unit.
Also, passing a fixed-size Eigen::Matrix
by value is wrong because the argument may have incorrect alignment. This is more than a nit. 😉
/// Values for executing a position and spread command. | ||
Eigen::Vector3d mProximalGoalPositions; | ||
double mSpreadGoalPosition; | ||
virtual void step(double timeSincePreviousCall) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the timeSincePreviousCall
argument. If this is necessary inside some executors, maintain this state as a member variable.
/// joint limit is reached or collision is detected. | ||
/// Only the proximal joint is actuated; the distal joint moves with mimic ratio. | ||
/// When collision is detected on the distal link, the finger stops. | ||
/// When collision is detected on the proximal link, the distal link moves | ||
/// until it reaches joint limit or until distal collision is detected. | ||
class BarrettFingerPositionCommandExecutor | ||
class SimBarrettFingerPositionCommandExecutor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simulated
, not Sim
! 😉
::dart::dynamics::ChainPtr _finger, int _proximal, int _distal, | ||
::dart::collision::CollisionDetectorPtr _collisionDetector, | ||
::dart::collision::CollisionGroupPtr _collideWith, | ||
::dart::collision::CollisionOption _collisionOptions | ||
= ::dart::collision::CollisionOption(false, 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest making the _collideWith
argument optional. If it's not specified, default to an empty CollisionGroup
.
@jslee02 As far as I know, I don't think it's necessary to create an abstract class for fingers. The abstraction at hand level is necessary so that both simulation-mode and real-mode can be handled by the same API. The real-mode does not need finger-executors; we just need to call something like |
After discussion with @mkoval I had to make another major change: change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest changing collideWith
as optional like @mkoval suggested. Otherwise, looks good to me.
/// the proximal joint. The joint movements follow | ||
/// this ratio only when both joints are moving. | ||
/// \return mimic ratio. | ||
static double getMimicRatio(); | ||
constexpr static double getMimicRatio() { return kMimicRatio; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Redundant trailing semicolon
/// See dart/collison/Option.h for more information | ||
BarrettFingerKinematicSimulationPositionCommandExecutor( | ||
::dart::dynamics::ChainPtr finger, size_t proximal, size_t distal, | ||
::dart::collision::CollisionGroupPtr collideWith, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @mkoval suggested, we could make collideWith
optional and pass nullptr
as default. Also, as becoming collideWith
optional, here are necessary and optional changes I can think of:
- We should pass collision detector, which is the same that created
collideWith
(if it's notnullptr
). - If
_collisionDetector
isnullptr
, we could create a collision detector of default collision detector type (FCL?) and assign it tomCollisionDetector
. - If
collideWith
's collision detector is not the same, we could create new collision group (newcollideWith
) frommCollisionDetector
. In this case, we might want to print warning that themCollideWith
is not the same withcollideWith
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that the arguments should be finger
, proximal
, distal
(which are all required arguments), collisionDetector
and collideWith
(which are both optional and default to nullptr
), and collisionOptions
(which remains optional and defaults to false
and 1
).
It seems like the three cases are:
- If
collisionDetector
andcollideWith
are not specified, setcollisionDetector
to anFCLCollisionDetector
andcollideWith
to a new emptyCollisionGroup
with that collision detector. - If
collisionDetector
is specified andcollideWith
is not, setcollideWith
to a new emptyCollisionGroup
withcollisionDetector
as the collision detector - If
collisionDetector
andcollideWith
are specified, check that the collision detector forcollideWith
matchescollisionDetector
. if not, setcollideWith
to a new emptyCollisionGroup
withcollisionDetector
as the collision detector
@jslee02 Is my understanding correct and if so, does e16880e seem reasonable? In particular, I'm unsure what it means for two collision detectors to not be the same. Do they have to be literally the same object or just the same type of collision detector? It also seems surprising to me to automatically set collideWith
to an empty collision group if there were originally collision objects in there, so I think I might be misunderstanding something. 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The three cases sound good and e16880e looks reasonable! I would like to add one additional case that collisionDetector
is nullptr
and collideWith
is specified. In this case, we set mCollisionDetector
to collideWith->getCollisionDetector()
.
In particular, I'm unsure what it means for two collision detectors to not be the same. Do they have to be literally the same object or just the same type of collision detector?
They have to be the same type, but don't necessarily need to be the same object (but it would be good to be the same object because it could share collision geometries -- this is an implementation detail). The main role of a collision detector is to enforce us to create collision groups of the same collision detection engines (e.g., fcl, bullet, ode). This is necessary because we cannot collide two collision groups created from different collision engines (unless a collision detection engine supports that feature, which I haven't heard about it).
The last bullet point case in my previous comment is that collideWith
's collision detector (who created collideWith
) is not the same type with collisionDetector
. In this case, we cannot collide HERB hand with collideWith
because of the reason described above. So we might want to either (1) create a new collision group from the shape frames in collideWith
through collisionDetector
or (2) create a collision group of HERB hand through the collision detector type of collideWith
by collideWith->getCollisionDetector()->createCollisionGroup(...)
.
Sorry, probably my description was unclear. 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thank you for the clarification! I've rewritten the logic to add the fourth case. 😃
/// with this executor, it is necessary to lock the skeleton before | ||
/// calling this method. | ||
/// \param[in] timeSincePreviousCall Time interval to take. | ||
void step(const std::chrono::milliseconds& timeSincePreviousCall); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ignore if this is already discussed: Wouldn't there be a reasonable default interval time here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call would always be called by BarrettHandKinematicSimulationPositionCommandExecutor::step()
method, so I am not sure whether a default is necessary. We can set it to something I guess... :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that's the case, I'm fine with not setting a default value here.
const std::array< | ||
BarrettFingerKinematicSimulationPositionCommandExecutorPtr, 3>& positionCommandExecutors, | ||
BarrettFingerKinematicSimulationSpreadCommandExecutorPtr spreadCommandExecutor, | ||
::dart::collision::CollisionGroupPtr collideWith); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Passing nullptr
as default? (see above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wound up basically copying and pasting the optional nullptr logic from BarrettFingerKinematicSimulationPositionCommandExecutor
. Since the two classes are completely independent I didn't see an obvious way to avoid that... 😢
mProximalGoalPositions = _positions.topRows(3); | ||
mSpreadGoalPosition = _positions(3); | ||
mCollideWith = _collideWith; | ||
mProximalGoalPositions = goalPositions.topRows(3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: topRows()
is a method for matrices. We could the method for vectors as head<3>()
mSpreadGoalPosition = _positions(3); | ||
mCollideWith = _collideWith; | ||
mProximalGoalPositions = goalPositions.topRows(3); | ||
mSpreadGoalPosition = goalPositions(3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Brackets [ ]
are preferable for vector indexing.
Duplicate changes in BarrettHandKinematicSimulationPositionCommandExecutor.
{ | ||
if (mCollideWith) | ||
// If a collision group is given and its collision detector does not match | ||
// mCollisionDetector, set the collision group to an empty collision group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add ShapeFrame
s of collideWith
to the new collision group as
mCollideWith = mCollisionDetector->createCollisionGroup();
for (auto i = 0u; i < collideWith->getNumShapeFrames(); ++i)
mCollideWith->addShapeFrame(collideWith->getShapeFrame(i));
so that still can check collision as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a bunch of nitpick comments. There are two more important (but still relatively easy) changes hidden in there:
- Remove the argument from
step()
on all of the classes. - Hide the instantiation of the finger and spread executors inside the
BarrettHandPositionCommandExecutor
constructgor, since they are an implementation detail.
My expectation is that this PR will be ready to merge after we make those two changes. 👍
/// the proximal joint. The joint movements follow | ||
/// this ratio only when both joints are moving. | ||
/// \return mimic ratio. | ||
static double getMimicRatio(); | ||
constexpr static double getMimicRatio() { return kMimicRatio; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We could nix this function and just use kMimicRatio
directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the only time that getMimicRatio
is used is in tests, but kMimicRatio
is private so getting rid of this function wouldn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. Let's leave it as it is.
constexpr static double kDistalVelocity = kProximalVelocity*kMimicRatio; | ||
private: | ||
constexpr static double kMimicRatio = 0.333; | ||
constexpr static double kProximalSpeed = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did kProximalSpeed
change from 0.01
to 1
? 🤔 Do we know which (if either) of these is correct for the BarrettHand?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was because the hand was moving really slowly when we were visualizing it in sim. I don't know if either is correct. How would we check that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect we arbitrarily chose a value for testing, then. 😢
-
Our controller calls the
trapezoidalMove()
function to move the hand: -
That function sets the
E
Puck property to the desired position, then theMODE
property toMODE_TRAPEZOIDAL
to execute the action. -
Here is a snippet of the description of the behavior of the hand in
MODE_TRAPEZOIDAL
(the full description goes into much more detail):[...] The BarrettHand will generate its own trapezoidal velocity profile to accelerate from its present position (using ACCEL) until it reaches max velocity (MV), then it will decelerate to reach the target endpoint position at zero velocity. [...]
So the correct way to get this value is to query the MV
property on the four pucks in the BarrettHand, then use the transmission ratio to convert the motor velocity to a joint velocity. We should do this at some point (maybe file an issue?), but it's not urgent to get this right.
In the meantime, we can estimate a value by timing how long it takes the hand to close. This is all an approximation, anyway, since we are assuming the finger immediately accelerates to its maximum velocity.
From watching a YouTube video of HERB, I estimate around 1 s. Since the joint range is 140 degrees, this is around 2.4 rad/s. 🔬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, I am not sure why this value is hardcoded at all. We should use the velocity limits that are stored in the DART Skeleton
. Those are currently set to 2 rad/s in herb_description
, which is already in the correct ballpark. 👍
@brianhou Are you up for making that change? 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, it seems like making this change would require kProximalSpeed
and kDistalSpeed
to not be static, right? I'm not sure why they're static now and whether that's necessary though.
/// maxNumContacts = 1.) | ||
BarrettFingerKinematicSimulationSpreadCommandExecutor( | ||
std::array<::dart::dynamics::ChainPtr, 2> fingers, size_t spread, | ||
::dart::collision::CollisionGroupPtr collideWith, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Make collideWith
optional.
::dart::collision::CollisionDetectorPtr collisionDetector = nullptr, | ||
::dart::collision::CollisionGroupPtr collideWith = nullptr); | ||
|
||
/// Set relevant variables for moving fingers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Confusing docstring.
constexpr static auto kWaitPeriod = std::chrono::milliseconds(1); | ||
|
||
/// Executor for proximal and distal joints. | ||
std::array<BarrettFingerKinematicSimulationPositionCommandExecutorPtr, 3> mPositionCommandExecutors; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Use kNumPositionExecutor
instead of 3
for the template parameter.
::dart::collision::CollisionGroupPtr collideWith) | ||
{ | ||
std::lock_guard<std::mutex> lockSpin(mMutex); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Check that collideWith->getCollisionDetector()
is correct. Alternatively, update mCollisionDetector
with that value.
mInExecution = true; | ||
|
||
return mPromise->get_future(); | ||
} | ||
} | ||
|
||
//============================================================================= | ||
void BarrettFingerSpreadCommandExecutor::step(double _timeSincePreviousCall) | ||
void BarrettFingerKinematicSimulationSpreadCommandExecutor::step( | ||
const std::chrono::milliseconds& timeSincePreviousCall) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above. I suggest removing this parameter entirely, so this class complies with the PositionCommandExecutor
interface.
// Current spread. Check that all spreads have same values. | ||
double spread = mSpreadDofs[0]->getPosition(); | ||
for(int i=1; i < kNumFingers; ++i) | ||
for(size_t i = 1; i < kNumFingers; ++i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an off-by-one error. What am I missing? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's off-by-one. It uses the 0th-finger's spread value to check that the rest of the fingers (the other finger) has the same spread value. We implemented this because the spread is symmetric.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I see that now. 👍
if (mInExecution) | ||
return false; | ||
|
||
mCollideWith = collideWith; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: std::move
.
::dart::collision::CollisionGroupPtr collideWith) | ||
{ | ||
std::lock_guard<std::mutex> lockSpin(mMutex); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify (or make) collideWIth->getCollisionDetector()
be consistent with mCollisionDetector
.
…cutor in HandPositionCommandExecutor. Adapted from https://github.com/personalrobotics/libherb/pull/20.
Make test_BarrettFinger* compile (although actual execution seems to fail). Make part of test_BarrettHand compile, although introducing `robot` as a parameter seems like it will make testing this difficult.
I realized I forgot to fix the tests, but I've fixed some of them now so that at least they all compile and run.
|
Decrease expected proximal value in BarrettFingerKinematicSimulationPositionCommandExecutorTest.execute_proximalStopsAtCollsionDistalContinuesUntilCollision
@brianhou To answer the questions:
|
The only real option I see is to include a BarrettHand model in the Aikido repository. We can put that in the I suggest building @jslee02 had some trouble with (2) in DART, but was able to work around it using a custom |
Do we want to test |
We decided that the right thing to do is to include a Barrett hand model in the repository at some point. In the meantime, we'll merge this (to unblock other PRs) and open an issue to fix that. |
Merge branch 'master' into rosBarrettHandExecutor
This PR adds BarrettHandPositionCommandExecutor and renames several classes. This is necessary/convenient to have a non-simulation counterpart
ros::RosBarrettHandPositionCommandExecutor
which has the sameexecute
method signature as the existing sim-mode-executor.BarrettHandPositionCommandExecutor
which containsexecute
method for four finger goal positions (3 primal, 1 spread).Barrett*Executor
classes toSimBarrett*Executor
collideWith
param from theirexecute
method to match the abstract class'sexecute
signaturecollideWith
to the contructors forSimBarrett*Executor
classessetCollideWith
methods toSimBarrett*Executor
classesOne question for @mkoval : shouldn't we expose
step
(orspin
) method for all Executors, including the higher level abstract classes? (applies to #149 as well)