Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

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

@5ervant

Description

@5ervant

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions