klampt.control.interop module¶
Defines utilities for connecting simulation controllers to the Robot Interface Layer, and connect ControllerBlocks to RobotInterfaceBase receivers.
Classes:
|
A class that connects the I/O of a standard |
|
A class that manages connections between the sensor readings of a |
|
A class that provides an API like |
-
class
klampt.control.interop.
RobotControllerToInterface
(controller, robotInterface, controllerRateRatio=1)[source]¶ Bases:
object
A class that connects the I/O of a standard
ControllerBlock
robot controller with aRobotInterfaceBase
Robot Interface Layer API.- Parameters
controller (ControllerBlock) – the controller software, should conform to the RobotControllerBase convention.
robotInterface (RobotInterfaceBase) – the robot interface
controllerRateRatio (float, optional) – if not 1, scales how many times the controller is run for each main loop of the robotInterface
Methods:
advance
()
-
class
klampt.control.interop.
RobotInterfacetoVis
(robotInterface, visRobotIndex=0)[source]¶ Bases:
object
A class that manages connections between the sensor readings of a
RobotInterfaceBase
Robot Interface Layer API to the Klamp’t vis module.This assumes that
vis
has been set up with an appropriate world.Methods:
update
()
-
class
klampt.control.interop.
SimRobotControllerToInterface
(robotInterface)[source]¶ Bases:
object
A class that provides an API like
SimRobotController
so that simulation control code can be ported easily to aRobotInterfaceBase
Robot Interface Layer API.Missing:
setRate(dt): can’t change a real robot’s control rate.
getSetting()/setSetting(): no interface to configure robot.
setMilestone(q,dq): can’t set a terminal velocity.
add*(): can’t queue up commands.
getPIDGains(): can’t configure PID gains.
- Parameters
robotInterface (RobotInterfaceBase) – the robot interface to use
Methods:
addCubic
(q, dt)addLinear
(q, dt)addMilestone
(q[, dq])commands
()endStep
()getRate
()getSetting
(name)model
()sendCommand
(name, args)sensor
(index_or_name)setCubic
(q, v, dt)setLinear
(q, dt)setManualMode
(enabled)setMilestone
(q[, dq])setPIDCommand
(qdes, dqdes[, tfeedforward])setPIDGains
(kP, kI, kD)setRate
(dt)setSetting
(name, val)setTorque
(t)setVelocity
(dq, dt)