-
Notifications
You must be signed in to change notification settings - Fork 104
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
rendering #92
rendering #92
Conversation
update render spec loading params from file, add rendering steering angle, remove unused pyglet tests, update setup dependencies
add fps on bottom-left corner, add configurable car tickness
move zoom-in in the map renderer and only for render-mode human, update render_fps in env based on the value of the renderer
move car rendering in separate class, draw two lines for wheels
move poses, colors, etc in car object
use zoom-in-factor of 2.0
add two rendering configurations, add test and benchmark script
Basic rendering in pygame implemented, removed dependency on pyglet. |
update render spec loading params from file, add rendering steering angle, remove unused pyglet tests, update setup dependencies
add fps on bottom-left corner, add configurable car tickness
move zoom-in in the map renderer and only for render-mode human, update render_fps in env based on the value of the renderer
move car rendering in separate class, draw two lines for wheels
move poses, colors, etc in car object
use zoom-in-factor of 2.0
add two rendering configurations, add test and benchmark script
# Conflicts: # examples/waypoint_follow.py # gym/f110_gym/envs/f110_env.py # gym/f110_gym/envs/rendering/__init__.py # gym/f110_gym/envs/rendering/renderer.py # gym/f110_gym/envs/rendering/rendering.yaml # gym/f110_gym/envs/rendering/rendering_pygame.py # gym/f110_gym/test/test_scan_sim.py
f110 env: set render-fps to match integrator timestep to match real time in human/rgb-array render mode. refactoring config files renderer
Integrate comments discussed in previous meetings. I think it is good enough to close it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor things, otherwise looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be refactored to be much simpler:
class TextObject:
def __init__(self, window_shape, relative_font_size:int = 32, font_name:str = "Arial"):
... init stuff is all identical ...
def _position_resolver(self, position: Union[str, tuple], text, display):
""" This function takes strings like "bottom center" and converts them into a location for the text to be displayed.
if position is tuple, then passthrough.
"""
def render(self, text:str, position, display):
self.text = self.font.render(...)
position = self._position_resolver(...)
display.blit(self.text, position)
Then everything is a simple wrapper around this class, and it should be easier for users to reuse this for custom text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for me, please proceed
I'm also noticing that as I zoom in with rendering.yaml, the render speed gets slower? Not sure what's causing this under the hood |
fix warning on accessing env.track with env.unwrapped.track
@hzheng40 @nandantumu the minor required changes done. As soon as the change to TextObject (@nandantumu) is done, we can merge. |
Known issue due to the way the track surface is rendered. As discussed, we let alternative solutions for future work. |
Implemented TextObject. Merging. |
Update rendering with pygame.
Support render modes "human", "human_fast", "rgb_array", "rgb_array_list".
Provide minimal set of callbacks to render racelines, local paths and points.
Two configurations for human time and faster.