-
Notifications
You must be signed in to change notification settings - Fork 525
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
F#182 partial trajectory mod #185
F#182 partial trajectory mod #185
Conversation
…n only hold one goal at a time
I did a first pass reading the PR. I'll do a second, more detailed one soon and come back with any comments that might arise. I'd also like to do some experimental testing. Thanks for putting this together. |
Thanks @adolfo-rt for reviewing it. I found an error in my branch when a new trajectory was send with an empty vector of accelerations. It is fixed now. |
template <class Trajectory> | ||
bool IsNotEmpty(typename Trajectory::value_type trajPerJoint) | ||
{ | ||
return trajPerJoint.size()>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.
return !trajPerJoint.empty();
@beatrizleon Update: I'm in the middle of a detailed code review. I'm about halfway done, and I'd like to give some feedback tomorrow. |
@@ -114,6 +113,12 @@ struct InitJointTrajectoryOptions | |||
ros::Time* other_time_base; | |||
}; | |||
|
|||
template <class Trajectory> | |||
bool IsNotEmpty(typename Trajectory::value_type trajPerJoint) |
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.
isNotEmpty
I ran the tests and tested it in simulation. Seems to work as expected (yay). Make it opt-in When a new command specifying a subset of the joints is processed, the unspecified joints keep on executing their previous goal as if nothing happened. I see potential for robots doing unexpected things when different commands that don't know about each other interact. There's always been the risk of controller clients sending bogus commands and crashing the robot or some other unexpected behavior, but the interaction of conflicting commands within a controller was never an issue. I would consider this an advanced behavior that has to be enabled explicitly, as in I know what I'm doing. Review thoroughness To make the test suite more complete and exercise the new feature, I'm thinking of: while the controller executes a trajectory involving all joints (not holding position, but actually moving), send a new command (topic interface) or goal (action interface) that:
I would also like the implementation to be validated on a real-time system. More The structure and style of the patch can be improved for better code reading and brevity ,but I'll skip those comments for now. |
@adolfo-rt Thanks for the review. I am going through your comments now. |
How are you thinking we could implement the opt-in option? |
With a ROS parameter, say
Note that these checks relied on the |
Added the ros param. I named it: "allow_partial_joints_goal" but it is opened to suggestions :) |
@adolfo-rt I added a set of tests (very similar to the existing ones) to test partial trajectories which included the ones you mentioned in your previous comment. We do not have a real time system, then I would not be able to test that. Appart from that I think I have addressed all your comments. Let me know what you think. |
@adolfo-rt any news on this? We're kind of waiting for that functionality at Shadow :) Cheers, Ugo |
@ugocupcic - @adolfo-rt did mention on the mailing list that he would be offline for 3 weeks starting Sept. 8. |
Ah! OK thanks @sachinchitta :) |
@adolfo-rt any new on this? If there is anything else that we could improve to get it merged please let us know. |
It has been nearly three month since @adolfo-rt was last active on github. |
I made the releases for Kinetic and if all goes fine (since it's a well discussed issue) I will merge it to kinetic-devel soon. I'm not sure though if these changes should go to Indigo&Jade as well, so my approach so far was to merge all new stuff to kinetic-devel, and wait for some of our sleeping agents to appear so we can discuss propagating them back to indigo&jade. |
We are going to try to rebase this branch and open a new PR against kinetic-devel. Hopefully this week or the next. @bmagyar please let us know if we should also keep this PR open just in case it's getting merged into indigo later on. |
Great Toni! For the rebase may I ask you to also either squash the commits into one huge commit or into bigger chunks so that the "work in progress" type of commits are not reflected in the proposed changes? It's better if we track feature additions rather than the entire development processes. Once the new PR is open, this can be closed. I am personally ok to push through all the new stuff for ROS Kinetic but if you'd like back-support for Indigo we will have to gather some more people and get a lot more feedback. If you wish to have the Kinetic features in older distros, feel free to open an issue and let's discuss them there. |
Closing since we merged it to Kinetic. |
Enables the control of partial trajectories. In order to do this, a trajectory now is composed of a vector of vectors of segments (one vector of segments per each joint), so each joint can a vector with different number of segments.
The changes of code are the minimum I could modify to make it work. If the changes are accepted, we can improve it. Specially, the definition of a segment, as it is only per joint, it does not need a permutation vector, and all its related methods.
All test are passing, but I had to modify some of them to the new implementation. If it is accepted, we can think of new test needed specifically to test partial trajectories.