Skip to content
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

Merged
merged 74 commits into from
Apr 23, 2019
Merged

RWC2018 #101

merged 74 commits into from
Apr 23, 2019

Conversation

MatthijsBurgh
Copy link
Member

No description provided.

Rayman and others added 30 commits June 16, 2018 20:31
…machine in an Action

See commit 4a8c34fca1d07a59ac75976390fc76dcd8faba6e of
https://www.github.com/tue-robotics/tue_robocup
pass


if __name__ == "__main__":
Copy link
Contributor

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

Copy link
Contributor

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!

action_server/src/action_server/actions/guide.py Outdated Show resolved Hide resolved
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?!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at this ToDo

@LarsJanssenTUe LarsJanssenTUe mentioned this pull request Feb 12, 2019
Closed
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
Copy link
Contributor

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?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ToDo

@rokusottervanger
Copy link
Member

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?

@MatthijsBurgh
Copy link
Member Author

@LarsJanssenTUe is working on this. He is pretty close I think. Am I correct?

@@ -1,10 +1,11 @@
import rospy

from action import Action, ConfigurationData
Copy link
Member Author

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
Copy link
Member Author

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

Copy link
Member

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

Copy link
Member Author

@MatthijsBurgh MatthijsBurgh Mar 25, 2019

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?

Copy link
Member

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.

Copy link
Member Author

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)]
Copy link
Contributor

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

@LarsJanssenTUe
Copy link
Contributor

The ToDo's and the separate testing files are currently in an issue: #111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants