anki / cozmo-python-sdk

Anki Cozmo Python SDK
Other
661 stars 427 forks source link

For cozmo_sdk, i want to code cozmo to have different animation and facial expression. #197

Closed thunderslack91 closed 6 years ago

thunderslack91 commented 6 years ago

This is the only animation i found in examples/apps/remote_control_cozmo.py.

default_anims_for_keys = ["anim_bored_01", # 0
"anim_poked_giggle", # 1
"anim_pounce_success_02", # 2
"anim_bored_event_02", # 3
"anim_bored_event_03", # 4
"anim_petdetection_cat_01", # 5
"anim_petdetection_dog_03", # 6
"anim_reacttoface_unidentified_02", # 7
"anim_upgrade_reaction_lift_01", # 8
"anim_speedtap_wingame_intensity02_01" # 9
]

Below are the code for my animation, i not sure whether the below codes are correct

if (intentName == "animation")
{
if (parameters["movement"].ToString() == "random")
{
pythonCode += tabs + "\trobot.play_anim('id_poked_giggled').wait_for_completed()\n";
pythonCode += tabs + "\trobot.play_anim('anim_hiking_react_05').wait_for_completed()\n";
}
else if(intentName=="giggle")
{
pythonCode += tabs + "\trobot.play_anim(name = 'anim_poked_giggle').wait_for_completed()\n";
}         
}
msintov commented 6 years ago

@thunderslack91 If you could, please repost this on our forums (https://forums.anki.com/) which is a better place to get help with your code. Thanks!