Giter Club home page Giter Club logo

deepracer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepracer's Issues

How Can I solve this Error ? at (Iteration 1 - PurePursuit) and (Iteration 4 - SelfMotivator)

The params dictionary object contains the following key-value pairs:

{
    "all_wheels_on_track": Boolean,        # flag to indicate if the agent is on the track
    "x": float,                            # agent's x-coordinate in meters
    "y": float,                            # agent's y-coordinate in meters
    "closest_objects": [int, int],         # zero-based indices of the two closest objects to the agent's current position of (x, y).
    "closest_waypoints": [int, int],       # indices of the two nearest waypoints.
    "distance_from_center": float,         # distance in meters from the track center 
    "is_crashed": Boolean,                 # Boolean flag to indicate whether the agent has crashed.
    "is_left_of_center": Boolean,          # Flag to indicate if the agent is on the left side to the track center or not. 
    "is_offtrack": Boolean,                # Boolean flag to indicate whether the agent has gone off track.
    "is_reversed": Boolean,                # flag to indicate if the agent is driving clockwise (True) or counter clockwise (False).
    "heading": float,                      # agent's yaw in degrees
    "objects_distance": [float, ],         # list of the objects' distances in meters between 0 and track_length in relation to the starting line.
    "objects_heading": [float, ],          # list of the objects' headings in degrees between -180 and 180.
    "objects_left_of_center": [Boolean, ], # list of Boolean flags indicating whether elements' objects are left of the center (True) or not (False).
    "objects_location": [(float, float),], # list of object locations [(x,y), ...].
    "objects_speed": [float, ],            # list of the objects' speeds in meters per second.
    "progress": float,                     # percentage of track completed
    "speed": float,                        # agent's speed in meters per second (m/s)
    "steering_angle": float,               # agent's steering angle in degrees
    "steps": int,                          # number steps completed
    "track_length": float,                 # track length in meters.
    "track_width": float,                  # width of the track
    "waypoints": [(float, float), ]        # list of (x,y) as milestones along the track center

}

Soo,
Can you help me for this "Iteration 1 - PurePursuit" car_orientation is not available so what can we do ther ?

and error at closest_waypoints

Here is my Code :

import math

def reward_function(params):

    # self = params['self']
    # steps = params['steps']
    # on_track = params['on_track']
    # progress = params['progress']
    # throttle = params['throttle']
    # steering = params['steering']
    # track_width = params['track_width']
    # distance_from_center = params['distance_from_center']
    x = params['x']
    y = params['y']
    waypoints = params['waypoints']
    heading = params['heading']
    closest_waypoints = params['closest_waypoints']

    reward = 1e-3

    rabbit = [0, 0]
    pointing = [0, 0]

    rabbit = [waypoints[closest_waypoints+1]
              [0], waypoints[closest_waypoints+1][1]]

    radius = math.hypot(x - rabbit[0], y - rabbit[1])

    pointing[0] = x + (radius * math.cos(heading))
    pointing[1] = y + (radius * math.sin(heading))

    vector_delta = math.hypot(pointing[0] - rabbit[0], pointing[1] - rabbit[1])

    if vector_delta == 0:
        reward += 1
    else:
        reward += (1 - (vector_delta / (radius * 2)))

    return reward

I'm change heading instead of car_orientation .

But there still NOT Working any more.

can only concatenate list (not "int") to list; name 'math' is not defined

Upon rewriting "PurePursuit" for the current Reward function's Code editor, I'm getting these errors:

  • can only concatenate list (not "int") to list

    rabbit = [waypoints[closest_waypoints+1][0], waypoints[closest_waypoints+1][1]]
    
  • name 'math' is not defined

    radius = math.hypot(x - rabbit[0], y - rabbit[1])
    
    pointing[0] = x + (radius * math.cos(heading))
    pointing[1] = y + (radius * math.sin(heading))
    
    vector_delta = math.hypot(pointing[0] - rabbit[0], pointing[1] - rabbit[1])
    

Is this the latest conversion for the declaration of rabbit?
rabbit = [waypoints[closest_waypoints[1]][0],waypoints[closest_waypoints[1]][1]]
or rabbit = [waypoints[closest_waypoints[0]][0],waypoints[closest_waypoints[0]][0]]

And also how can we use math if it's not defined on the current AWS DeepRacer model's code editor?

Congrats!

Congrats to the first place in the Chicago Event!
I have tried out your SelfMotivator code before and have just seen that you won Chicago!
Well done. I guess you were able to create an even better model.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.