dbg(robots): check sent action wheels lekiwi
This commit is contained in:
parent
48e47e97df
commit
a74345bf53
|
@ -85,9 +85,7 @@ def main():
|
|||
keyboard = KeyboardTeleop(keyboard_config)
|
||||
|
||||
logging.info("Configuring LeKiwi Client")
|
||||
robot_config = LeKiwiClientConfig(
|
||||
id="daemonlekiwi", calibration_dir=".cache/calibration/lekiwi", robot_mode=RobotMode.TELEOP
|
||||
)
|
||||
robot_config = LeKiwiClientConfig(id="lekiwi", robot_mode=RobotMode.TELEOP)
|
||||
robot = LeKiwiClient(robot_config)
|
||||
|
||||
logging.info("Creating LeRobot Dataset")
|
||||
|
|
|
@ -186,7 +186,9 @@ class LeKiwi(Robot):
|
|||
if not self.is_connected:
|
||||
raise DeviceNotConnectedError(f"{self} is not connected.")
|
||||
|
||||
obs_dict = {}
|
||||
# TODO(Steven): remove hard-coded cam name
|
||||
# This is needed at init for when there's no comms
|
||||
obs_dict = {OBS_IMAGES: {}}
|
||||
|
||||
# Read actuators position for arm and vel for base
|
||||
start = time.perf_counter()
|
||||
|
|
|
@ -246,6 +246,7 @@ class LeKiwiClient(Robot):
|
|||
# Convert each wheel’s angular speed (deg/s) to a raw integer.
|
||||
wheel_raw = [LeKiwiClient._degps_to_raw(deg) for deg in wheel_degps]
|
||||
|
||||
# TODO(Steven): remove hard-coded names
|
||||
return {"left_wheel": wheel_raw[0], "back_wheel": wheel_raw[1], "right_wheel": wheel_raw[2]}
|
||||
|
||||
# Copied from robot_lekiwi MobileManipulator class
|
||||
|
@ -396,7 +397,6 @@ class LeKiwiClient(Robot):
|
|||
frame = np.zeros((480, 640, 3), dtype=np.uint8)
|
||||
obs_dict[OBS_IMAGES][cam_name] = torch.from_numpy(frame)
|
||||
|
||||
print("obs_dict", obs_dict)
|
||||
return obs_dict
|
||||
|
||||
def _from_keyboard_to_wheel_action(self, pressed_keys: np.ndarray):
|
||||
|
|
|
@ -71,7 +71,9 @@ def main():
|
|||
try:
|
||||
msg = remote_agent.zmq_cmd_socket.recv_string(zmq.NOBLOCK)
|
||||
data = dict(json.loads(msg))
|
||||
print("Received command:", data)
|
||||
_action_sent = robot.send_action(data)
|
||||
print("Sent action:", _action_sent)
|
||||
last_cmd_time = time.time()
|
||||
except zmq.Again:
|
||||
logging.warning("No command available")
|
||||
|
|
Loading…
Reference in New Issue