Marxbot#
- class pyenki.Marxbot#
Bases:
DifferentialWheeled,PhysicalObjectA
DifferentialWheeledMarxbot robot.The robot has a planar, omni-directional scanner, placed centrally at a height of 11 cm, which detects surrounding objects (distance and color).
Example:
>>> import pyenki >>> # create a world surrondded by a cylindrical wall. >>> world = pyenki.World(r=20.0, walls_color=pyenki.Color(0.8, 0.2, 0.1)) >>> marxbot = pyenki.Marxbot() >>> world.add_object(marxbot) >>> marxbot.position = (10.0, 0.0) >>> marxbot.angle = 0.0 >>> # Spin the robot on itself >>> marxbot.left_wheel_target_speed = 5.0 >>> marxbot.right_wheel_target_speed = -5.0 >>> world.step(0.1) >>> # Read the omnidirectional rgbd camera >>> # Distances >>> marxbot.scanner_distances array([30. , 29.73731892, ... >>> # Image >>> marxbot.scanner_image array([[0.8, 0.2, 0.1], ...
- scanner_distances#
An array of 180 radial distances, ordered from -180 degrees to 180 degrees, in centimeters (readonly).
- Type: