rlviser-py
Python implementation that manages a UDP connection to RLViser, it launches the RLViser binary from the current working directory upon first calling any render function.
The backbone of RLGym's env.render() functionality.
Example usage
import time
import rlviser_py as vis
import RocketSim as rs
game_mode = rs.GameMode.SOCCAR
# Create example arena
arena = rs.Arena(game_mode)
# Set boost pad locations
vis.set_boost_pad_locations([pad.get_pos().as_tuple() for pad in arena.get_boost_pads()])
# Setup example arena
car = arena.add_car(rs.Team.BLUE)
car.set_state(rs.CarState(pos=rs.Vec(z=17), vel=rs.Vec(x=50), boost=100))
arena.ball.set_state(rs.BallState(pos=rs.Vec(y=400, z=100), ang_vel=rs.Vec(x=5)))
car.set_controls(rs.CarControls(throttle=1, steer=1, boost=True))
# Run for 3 seconds
TIME = 3
steps = 0
start_time = time.time()
for i in range(round(TIME * arena.tick_rate)):
arena.step(1)
# Render the current game state
pad_states = [pad.get_state().is_active for pad in arena.get_boost_pads()]
ball = arena.ball.get_state()
car_data = [
(car.id, car.team, car.get_config(), car.get_state())
for car in arena.get_cars()
]
vis.render(steps, arena.tick_rate, game_mode, pad_states, ball, car_data)
# sleep to simulate running real time (it will run a LOT after otherwise)
time.sleep(max(0, start_time + steps / arena.tick_rate - time.time()))
steps += 1
# Tell RLViser to exit
print("Exiting...")
vis.quit()
Metadata
Release files for rlviser-py 0.6.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rlviser_py-0.6.14.tar.gz | 23.7 kB | Without provenance | Details for rlviser_py-0.6.14.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rlviser_py-0.6.14-cp37-abi3-win_amd64.whl | CPython 3.7 | abi3 | Windows x86-64 | Details for rlviser_py-0.6.14-cp37-abi3-win_amd64.whl |
| rlviser_py-0.6.14-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.7 | abi3 | Linux glibc 2.17+ x86-64 | Details for rlviser_py-0.6.14-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| rlviser_py-0.6.14-cp37-abi3-macosx_11_0_arm64.whl | CPython 3.7 | abi3 | macOS 11.0+ ARM64 | Details for rlviser_py-0.6.14-cp37-abi3-macosx_11_0_arm64.whl |
Total release size: 762.2 kB
Release files / rlviser_py-0.6.14.tar.gz
| Download URL | rlviser_py-0.6.14.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
555ac09f8ce8a36e42104e1899b01c6efaa3988b9c30f2d69ad2cecccb468960
|
|
BLAKE2b-256 checksum How to use checksums |
1b98393a9d5c33749c50105bfa8ec7f16559d674c9dd2d8a3ac3d165e9020995
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.13.3
|
Release files / rlviser_py-0.6.14-cp37-abi3-win_amd64.whl
| Download URL | rlviser_py-0.6.14-cp37-abi3-win_amd64.whl |
|---|---|
| Size | 202.8 kB |
| Tags | CPython 3.7 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9fd2e5e61df26df3ec5c6d0d4997276dcdd27d259a7a433d0d78ca17744ff167
|
|
BLAKE2b-256 checksum How to use checksums |
851915c46bb0824c1d1d193b69209a3e5ec7348408aeae864fabd4d0e87311f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.13.3
|
Release files / rlviser_py-0.6.14-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | rlviser_py-0.6.14-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 285.7 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
16713fb38aeda60475d86ec014bfcad4c6fc50bcf3e49e4f553ef3debcd77cb6
|
|
BLAKE2b-256 checksum How to use checksums |
342b601a39cff6ad707645f7fb61752228af057c5a93017f16f80488bef13461
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.13.3
|
Release files / rlviser_py-0.6.14-cp37-abi3-macosx_11_0_arm64.whl
| Download URL | rlviser_py-0.6.14-cp37-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 250.0 kB |
| Tags | CPython 3.7 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0e8889b0620e8509cf953088bd8cb183647eef7c1f1d733d2482db87275468c3
|
|
BLAKE2b-256 checksum How to use checksums |
c3b83b7a10572a3ed43304189c13b7bdf443863335ac7cc150f2dafe14c728e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.13.3
|
Security for rlviser-py 0.6.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.