-
Notifications
You must be signed in to change notification settings - Fork 938
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
New isValidVelocityMove() for checking time between two waypoints given velocity #684
Conversation
|
||
bool isValidVelocityMove(const JointModelGroup* group, const double* from_joint_pose, | ||
const double* to_joint_pose, std::size_t array_size, double dt) const; | ||
|
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 the overload with raw pointers? Convenience?
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.
speed! this is used in a more MoveIt!-integrated version of Descartes, where it is called hundreds of thousands of times in an iterative IK brute force-type approach. It uses Boost-graph to save each raw array of joints
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.
Passing a reference is slower than passing a pointer? Afaik they are basically the same, and the difference is purely syntactical.
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.
Oh I thought you were asking why these two functions instead of the RobotState version. Its overloaded just as a convenience I suppose, I don't recall why I have both, I'm just trying to get my research code to work with mainstream moveit again and not my fork. I think this style is not unfounded within RobotState however - e.g. setJointPosition() has it overloaded.
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.
robot state uses both vectors and raw pointers for lots of its functions, so i think this should remain.
|
||
double max_dtheta = dt * max_velocity; | ||
if (dtheta > max_dtheta) | ||
return false; |
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's going to be less efficient, but would it be an idea to add a ROS_DEBUG..
here with the joint that makes the check fail?
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.
ROS_DEBUG isn't used inside RobotState, but we could use logDebug
. However I agree that its less efficient so would prefer not.
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.
Done
Side note, @davetcoleman: Is this moveit-integrated version of Descartes something you plan on making open source or something you're going to keep internal to your company? |
In either case, is there a reason you've decided to clone the Descartes work rather than work with us to make it better or fit your needs? |
@Jmeyer1292 my Descartes-MoveIt work is https://github.com/davetcoleman/bolt from my thesis last year, which was funded by NIST and a collaboration with you guys at SwRI. This patch was created then and I'm trying to get back to the mainstream MoveIt!. Let's have a phone call to discuss collaborations on this effort. |
8b34f70
to
0105b3f
Compare
+1 |
ping @v4hn can I get a review? I already have one +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 think the old function RobotState::isValidVelocityMove(const RobotState& other, const JointModelGroup* group, double dt) const
should call into these new functions. Currently the old function, doesn't protect against non-standard joints.
|
||
if (var_bounds->size() != 1) | ||
{ | ||
logError("Attempting to check velocity bounds for waypoint move with joints that have multiple variables"); |
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'm not sure, how to handle non-standard joints here. Why do you want to bail out? You could also skip those joints.
Now, it's not possible to use this function for JMG's containing non-standard joints.
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 a future todo. I'm not inclined to support it since its an uncommon use case, but when the need arises i welcome the change
I added a TODO as such
I disagree - the RobotState version supports arbitrary groups of joints that are not necessary inline, whereas these new ones are optimized for the most common use case of a simple kinematic chain where the vector is in order. This can't be easily configured to call into each other without a big performance hit. |
0105b3f
to
c02475f
Compare
Addressed feedback, retargeted for melodic |
Then this should probably be documented in the API. @davetcoleman wouldn't it better fit as a member function of JointModelGroup since the robot state is not used? |
No further complaints from my side. But I like Henning's idea to move this into the |
That's a good point about not actually needing to be in RobotState but just JointModelGroup I don't have time for this right now but we could go two routes:
|
Move isValidVelocityMove() to JointModelGroup
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.
@rhaschke can we get this merged?
Should this be merged into master instead of melodic-devel? |
I'm the only current user of this API (via the Bolt planner) so its only needed in master. Retargeting. |
Looks like Travis has gotten a lot pickier... ? |
@davetcoleman, I think pull requests shouldn't include merge commits (d6fb60c). Please obey our merge policies.
Yes, and I'm very proud of the fact that I resolved all warnings such that Travis now can check for high code quality automatically. So please fix those warnings. |
Applied fix to clang warning |
…en velocity (moveit#684) * New isValidVelocityMove() for checking time between two waypoints given velocity * Move isValidVelocityMove() to JointModelGroup * Update moveit_core/robot_model/src/joint_model_group.cpp
…en velocity (moveit#684) * New isValidVelocityMove() for checking time between two waypoints given velocity * Move isValidVelocityMove() to JointModelGroup * Update moveit_core/robot_model/src/joint_model_group.cpp
This is a more computationally efficient version of the previously used isValidVelocityMove() functions added in #294
This allows faster Descartes-type functionality