-
Notifications
You must be signed in to change notification settings - Fork 41
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
Refactored fault-awareness and stop action #296
Refactored fault-awareness and stop action #296
Conversation
- Trajecotry executor can now use the grinder controller - Fixed bug in trajectory planner whereby the incorrect move group was being used
- Errors from ArmActionMixin are now handled as exception - The arm must now be checked out by an action server before it may be used. - Switch controller functions now check if a switch is unnecessary
- Stow and Unstow's implementation unified into a base mixin class - Removed follow trajectory callback function arguments. - Arm interface now must be checked out by something before any arm methods can be called. This both ensures more than one action cannot control the arm at once and enables the stop action to know when it has been effective.
- Separated fault logic out of ArmTrajectoryExecutor for greater code modularity.
- All functions in the planner now return False if planning fails
I saw a need for a last minute fix, which was just pushed. If you have already tested, I doubt this change is big enough to justify a retest. |
Probably unrelated to this PR, but I'm getting the following message every time I run an action client script: |
Out of this PR's scope, but the behavior of the arm after it finishes an operation with a faulted joint(s) with |
The tests pass, and I tried a few more. Regarding the code, my main comment is on the organization and file naming, which I don't find intuitive.
|
I think this is just ROS letting you know you're overdue for a package update. |
In regards to the Even though it may result in a longish file, I think the simplest solution is to put all actions into a single file called from ow_lander import actions
light_server = actions.LightSetInensityServer()
unstow_server = actions.UnstowServer() (not a real application, just a quick example) |
I get this too when running the scripts, but not with their previous iterations. Not sure what causes this or if it's indicative of any issue though, and strangely I don't have the rosdep package on my system. |
Following advice from a ROS forum, I just did a 'rosdep update' (not sudo), a bunch of packages got updated, and this message went away. @anthonykoutroulis , rosdep is not a package but an executable that should be in your search path (mine's in /usr/bin). If you don't have it, ask SG to install it for you. |
It's interesting to me you don't see the rosdep notice occur in noetic-devel. I did remove some ros package import statements that looked unnecessary to me during the refactor, maybe that is related. If performing a |
I have made the changes we discussed in our tag-up today along with some renaming that felt appropriate. Sadly the GitHub diff fails to recognize file similarities again, so I will specify the changes here. Code really did not change, things just got moved around, so a secondary code review is not really necessary.
|
The code changes/organization look good and the tests work as described. Quick observation that may be 'as intended': When doing a lock fault during stow, the arm fails to return as described with the console reporting the lock and then |
I am not sure it is as intended, it's more like undefined behavior as a result of the continue_arm_in_fault flag. I don't think we have decided on what the behavior should be yet, and as Michael pointed out in his earlier comment, doing so should probably be out of scope for this PR. |
I suppose that's what I meant by 'intended' 😆. It's out of the scope of this PR. All good for a merge on my end. |
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 now-empty actions
directory needs to be removed, otherwise this looks good! I gave it a quick retest.
Summary of Changes
ArmInterface
class. This enables a stop to work even during the trajectory planning phase (though you will have to wait for planning to complete) and allows the interface to reject new requests from other arm actions if the arm is already in use. Previously if a second arm action was called during the execution of the first, they would both attempt to send conflicting goals./src/ow_lander/actions
directory. Now all action servers are defined inside in eitherarm.py
orlander.py
. This was mostly done to streamline import statements of scripts in thescripts
directory. Now those statements will not have to be modified whenever an action is added or removed.Tests
All of the following tests can be done in order and in the same sim instance with 3 different terminals open. For setup:
devel/setup.bash
in 3 different terminals.roslaunch ow atacama_y1a.launch
Help Messages
Verify help messages make sense. Call:
rosrun ow_lander stop_client.py --help
rosrun ow_lander grind_client.py --help
In any free terminal.
Test grind
rosrun ow_lander grind_client.py
Allow the action to complete. Verify the trajectory looks the same as in noetic-devel
Test stop and arm ownership
rosrun ow_lander stop_client.py
You should see the following in the sim output
rosrun ow_lander unstow_client.py
rosrun ow_lander stop_client.py
The scoop will stop moving and you should see
rosrun ow_lander unstow_client.py
rosrun ow_lander stow_client.py
rosrun ow_lander unstow_client.py
Allow stow to complete, and then you should see the following in the sim output
Stop due to arm fault and continue flag
The arm should immediately stop and you'll see the following in sim output
arm_motion_continues_in_fault
flag (so that its turned on).Freestyle
There are more scenarios for this to test than I can list here. Feel free to spam it with multiple action requests and see if you can break it. Share your findings.