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

CML testing DAY1 #258

Closed
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class speech_model_params:
pause_threshold (Optional[float]): Seconds of non-speaking audio before a phrase is considered complete. Defaults to 0.8 seconds.
"""

model_name: str = "medium.en"
device: str = "cuda" if torch.cuda.is_available() else "cpu"
model_name: str = "small.en"
device: str = "cpu", # if torch.cuda.is_available() else "cpu"
start_timeout: float = 5.0
phrase_duration: Optional[float] = 10
sample_rate: int = 16000
Expand Down Expand Up @@ -210,7 +210,7 @@ class TranscribeSpeechAction(object):
# Cast to fp16 if using GPU
phrase = self._model.transcribe(
float_data,
fp16=self._model_params.device == "cuda",
fp16=self._model_params.device == "cpu",
)["text"]
transcription_end_time = timer()
rospy.loginfo(f"Transcription finished!")
Expand Down Expand Up @@ -256,7 +256,7 @@ def parse_args() -> dict:
parser.add_argument(
"--device",
type=str,
default="cuda" if torch.cuda.is_available() else "cpu",
default="cpu", # if torch.cuda.is_available() else "cpu",
help="Device to run the model on.",
)
parser.add_argument(
Expand Down
5 changes: 5 additions & 0 deletions skills/config/motions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ play_motion:
points:
- positions: [1.61, -0.93, -3.14, 1.83, -1.58, -0.53, 0.00]
time_from_start: 0.0
cml_arm_away:
joints: [ arm_1_joint, arm_2_joint, arm_3_joint, arm_4_joint, arm_5_joint, arm_6_joint, arm_7_joint ]
points:
- positions: [ 2.65, -1.36, -1.23, 1.86, -1.36, 1.39, -0.01 ]
time_from_start: 0.0
open_gripper:
joints: [gripper_left_finger_joint, gripper_right_finger_joint]
points:
Expand Down
2 changes: 1 addition & 1 deletion skills/src/lasr_skills/receive_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def __init__(self, object_name: Union[str, None] = None, vertical: bool = True):
)
smach.StateMachine.add(
"FOLD_ARM",
PlayMotion(motion_name="home"),
PlayMotion(motion_name="cml_arm_away"),
transitions={
"succeeded": "succeeded",
"aborted": "failed",
Expand Down