-
Notifications
You must be signed in to change notification settings - Fork 0
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
RWC2018 #101
RWC2018 #101
Conversation
…machine in an Action See commit 4a8c34fca1d07a59ac75976390fc76dcd8faba6e of https://www.github.com/tue-robotics/tue_robocup
pass | ||
|
||
|
||
if __name__ == "__main__": |
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.
Should this be placed in a separate testing script? @MatthijsBurgh @jlunenburg
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.
Personally I indeed prefer putting these tests (and hence the entire __main__
) in a separate test file. It's good though that there's a good and easy way to test it!
entity_designator = EntityByIdDesignator(self._robot, id=semantics.target_location.id) | ||
e = entity_designator.resolve() | ||
e = entity_designator.resolve() # TODO: nasty assumption that we can resolve this entity 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.
Look at this ToDo
self._config_result.context['object']['designator'] = self._found_entity_designator | ||
self._config_result.succeeded = True | ||
|
||
# TODO: Robocup hack to make sure the robot moves to the found person |
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.
ToDo fix!
@@ -21,105 +19,110 @@ class PickUp(Action): | |||
def __init__(self): | |||
Action.__init__(self) | |||
self._required_skills = ['arms'] | |||
self._find_action = None | |||
self._required_field_prompts = {'object': " What would you like me to pick up? ", | |||
'source-location': " Where would you like me to pick that up? "} # TODO: handle source location from context? |
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.
ToDo
Guys, why is this pr still not merged? It's almost time for tournaments, and this is still an open pr from rwc2018. I don't think anyone is still using the master on this, right? |
@LarsJanssenTUe is working on this. He is pretty close I think. Am I correct? |
…inspect' builtin Python module
@@ -1,10 +1,11 @@ | |||
import rospy | |||
|
|||
from action import Action, ConfigurationData |
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.
Most clean to start with action import
@@ -9,7 +9,7 @@ | |||
from guide import Guide | |||
from gripper_goal import GripperGoal | |||
from hand_over import HandOver | |||
from inspect import Inspect |
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.
Absolute imports will fix this
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.
That does not make sense for a __init__.py
file
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.
What are the guidelines for python3 regarding imports in __init__.py
?
I know that all normal imports should be absolute, right?
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.
Normal imports can also be relative but preferred to be absolute, esp. in our codebase.
When creating a package, which we do here, such relative imports are how it should be done: https://docs.python.org/2/tutorial/modules.html#packages
Python3 didn't change in this regard AFAIK.
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 am not sure what the best solution is yet, but if we start changing names, it should be consistent and done for all actions.
self._found_entity_designator = VariableDesignator(resolve_type=Entity) | ||
self._find_state_machines = [ | ||
states.FindPersonInRoom(robot, self._semantics.source_location.id, self._semantics.object.id, | ||
True, self._found_entity_designator.writeable)] |
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 fourth parameter should be variable depending on if the robot is looking for:
-a known person -> True
-Just anyone -> False
Can be done in the same way as done in line 130
The ToDo's and the separate testing files are currently in an issue: #111 |
No description provided.