Generated Python gRPC clients for the Vention simulation protos
Actively maintained. Last release 3 days ago. A safe choice.
pip install vention-sim-grpc-py-sdkvention-sim-grpc-py-sdk
Generated Python gRPC clients for the Vention simulation protos (physics/** and
vention/simulation/** under libs/proto/), published from this repo.
Install
pip install vention-sim-grpc-py-sdk
This also installs vention-grpc-py-sdk,
which ships the vention.robots, vention.io_modules, vention.machine_motion,
vention.motors, vention.vision, and google.type messages the simulation protos embed.
Use
import grpc
from vention.robots.v1.joint_trajectory_point_pb2 import JointTrajectoryPoint
from vention_sim import SIMULATION_SHA, VENTION_PROTOS_SHA, __version__
from vention_sim.simulation.v1.sim_robot_driver_commands_pb2 import StartTrajectoryRequest
from vention_sim.simulation.v4.scene.scene_management_service_pb2_grpc import SceneManagementServiceStub
channel = grpc.insecure_channel("localhost:50055")
scene = SceneManagementServiceStub(channel)
request = StartTrajectoryRequest(points=[JointTrajectoryPoint()])
print(f"built from simulation@{SIMULATION_SHA} and vention-protos@{VENTION_PROTOS_SHA}")
Import root
The modules live under vention_sim: a proto at vention/simulation/v1/x.proto is
vention_sim.simulation.v1.x_pb2, and one at physics/v3/x.proto is
vention_sim.physics.v3.x_pb2. Only the Python import path differs from protoc's default.
The proto packages (vention.simulation.*, physics.*), file names, gRPC method paths and
Any type URLs are unchanged, so a vention-grpc-py-sdk message drops straight into a
simulation request and reflection sees the same types as every other language.
protoc would otherwise place the stubs at vention.simulation.*, inside the vention
package that vention-grpc-py-sdk owns. Two distributions sharing a regular package only
work while both unpack into the same site-packages; editable installs and any layout with
more than one root on sys.path lose one of them. Giving this package its own import root
removes the shared directory, so it works in every layout and never depends on how
vention-grpc-py-sdk is laid out.