Closed bhairavmehta95 closed 6 years ago
Will fix the failing test tomorrow.
Just two nitpicks:
DUCKIE_SR
and other constants. Also note that I've been referring to the duckiebot elsewhere in the code as robot or agentFixed.
Also, it may be beneficial to merge #32 first, and then this one if that's okay?
Just because there were fixes to things like draw-bbox
on that PR.
In the future, I will try to branch out fixes like that (i.e ones that break certain functionality) and merge them into master as soon as possible. Sorry for the inconvenience.
Apologies, I seem to have created more conflicts.
I had removed the pos argument from _actual_center()
, and made the agent corners local variables in the collision check function.
Should be fixed now, as long as the tests pass.
Only thing is that we need to keep the agent corners member variables to ensure that the draw-bbox functionality works correctly (which is what I had to change in the last commit).
I tested the PR and took a closer look. Some feedback.
safety_radius = SAFETY_RAD_MULT * np.amax(
[abs(mesh.min_coords), abs(mesh.max_coords)]) * scale
This isn't quite right if we want a circle that wraps the entire bounding box, which is then multiplied by a scaling factor. You need to first compute the max absolute x and z, then compute sqrt(x^2 * + z^2).
You re-added the pos
argument to _actual_center()
:(
object_corners
is missing a comment
I think _safe_driving()
needs a more descriptive name, maybe just _safety_penalty()
I think this is it, it seems fine otherwise.
Oh my bad! I got confused when cleaning the merge conflicts so I must have switched the wrong code.
Will fix asap
On Tue, Jul 10, 2018, 2:25 PM Maxime Chevalier-Boisvert < notifications@github.com> wrote:
I tested the PR and took a closer look. Some feedback.
- I don't think this is accurate:
safety_radius = SAFETY_RAD_MULT np.amax( [abs(mesh.min_coords), abs(mesh.max_coords)]) scale
This isn't quite right if we want a circle that wraps the entire bounding box, which is then multiplied by a scaling factor. You need to first compute the max absolute x and z, then compute sqrt(x^2 * + z^2).
1.
You re-added the pos argument to _actual_center() :( 2.
object_corners is missing a comment 3.
I think _safe_driving() needs a more descriptive name, maybe just _safety_penalty()
I think this is it, it seems fine otherwise.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/duckietown/gym-duckietown/pull/36#issuecomment-403920720, or mute the thread https://github.com/notifications/unsubscribe-auth/AKBGMcMZd19QuySEI6ficYoRtOgUUfaGks5uFPGMgaJpZM4VIZVK .
Implements a simple safe driving penalty for use for collision detection. (Implemented as described in #24).
We will almost definitely need to scale the rewards from this and the rest of the environment to get the behavior that we are looking for.