Works with stationary agents#2
Conversation
svenkreiss
left a comment
There was a problem hiding this comment.
Thanks Parth. Had some comments :)
|
|
||
| # potentials | ||
| self.V = PedPedPotential(self.delta_t) | ||
| self.V = PedPedPotential(self.delta_t, v0, sigma) |
There was a problem hiding this comment.
Make this self.V = ped_ped or PedPedPotential(self.delta_t).
There was a problem hiding this comment.
I would like to keep (v0, sigma) so that one can provide them as arguments to the simulator initializer for hyper parameter tuning. Is there any other way to make this happen?
If I remove (v0, sigma), one cannot assign different values to these hyper parameters.
There was a problem hiding this comment.
you can provide ped_ped=PedPedPotential(v0, sigma) and also ped_ped=MyNewFunkyPedPedPotential( parameter1, parameter2, parameter3).
| tau in seconds: either float or numpy array of shape[n_ped]. | ||
| """ | ||
| def __init__(self, initial_state, ped_space=None, delta_t=0.4, tau=0.5): | ||
| def __init__(self, initial_state, ped_space=None, delta_t=0.4, tau=0.5, |
There was a problem hiding this comment.
add ped_ped=None, field_of_view=None
| self.U = ped_space | ||
|
|
||
| # field of view | ||
| self.w = FieldOfView() |
There was a problem hiding this comment.
similarly here self.w = field_of_view or FieldOfView()
There was a problem hiding this comment.
Can you please add or FieldOfView() so that default behavior is restored?
Similarly for ped_ped above.
| destination_vectors = state[:, 4:6] - state[:, 0:2] | ||
| norm_factors = np.linalg.norm(destination_vectors, axis=-1) | ||
| return destination_vectors / np.expand_dims(norm_factors, -1) | ||
| desired_directions = destination_vectors / np.expand_dims(norm_factors, -1) |
There was a problem hiding this comment.
This actually fails some code checks (cannot name variable like the function). I like your name, but maybe just name it directions?
|
I have done the proposed edits. |
svenkreiss
left a comment
There was a problem hiding this comment.
Thanks for the changes. One more comment (with that also the tests should be fixed). But if not, please check the logs of the tests to fix them. Just click on the link and it'll take you to the right test in Travis.
| self.U = ped_space | ||
|
|
||
| # field of view | ||
| self.w = FieldOfView() |
There was a problem hiding this comment.
Can you please add or FieldOfView() so that default behavior is restored?
Similarly for ped_ped above.
|
Thanks! The checks have been cleared. The current error in Travis file seems to be related to this issue "pylint-dev/pylint#2694" I don't think it is an issue from our code's side. |
|
It seems there are two options to fix this: bump astroid version to 2.2 or
remove Python 2.7 from tests as the Python3 tests don't show this error.
The official end of Python2 was January 1, 2020 so I think removing it
would be an option.
…On Fri, Feb 7, 2020 at 8:24 PM Parth Kothari ***@***.***> wrote:
Thanks! The checks have been cleared. The current error in Travis file
seems to be related to this issue "PyCQA/pylint#2694
<pylint-dev/pylint#2694>" I don't think it is an
issue from our code's side.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2?email_source=notifications&email_token=AAVFQJVUO44A4XGCQGH2DVLRBWYNHA5CNFSM4KNC6DP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELEH4QY#issuecomment-583564867>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVFQJW2CTWFVS32QMJLIADRBWYNHANCNFSM4KNC6DPQ>
.
|
|
Thanks! |
Two Changes: