Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

draft:[SW-1239] Expose body_height parameter in velocity_cmd() #129

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
exposed body_height parameter in velocity_cmd
tcappellari-bdai committed Jul 23, 2024
commit c92d995500566e5c50919833767d3af5dfa30f16
6 changes: 4 additions & 2 deletions spot_wrapper/wrapper.py
Original file line number Diff line number Diff line change
@@ -1277,7 +1277,7 @@ def get_mobility_params(self) -> spot_command_pb2.MobilityParams:
return self._mobility_params

def velocity_cmd(
self, v_x: float, v_y: float, v_rot: float, cmd_duration: float = 0.125
self, v_x: float, v_y: float, v_rot: float, cmd_duration: float = 0.125, body_height: float = 0
) -> typing.Tuple[bool, str]:
"""

@@ -1295,7 +1295,9 @@ def velocity_cmd(
"""
end_time = time.time() + cmd_duration
response = self._robot_command(
RobotCommandBuilder.synchro_velocity_command(v_x=v_x, v_y=v_y, v_rot=v_rot, params=self._mobility_params),
RobotCommandBuilder.synchro_velocity_command(v_x=v_x, v_y=v_y, v_rot=v_rot,
params=self._mobility_params,
body_height=body_height),
end_time_secs=end_time,
timesync_endpoint=self._robot.time_sync.endpoint,
)