Where is the Pidog Library?

How do you access the Preset Action Library in the Pidog? I cannot run the example in Chapter 6 of the documentation. Thanks.

Do you mean that the 6_be_picked_up.py example cannot be run?
What version of the system are you currently using?
Are the 6-DOF IMU and the 11-channel light board connected in series and connected to the i2c interface of the robot hat?
Is there any error message? If there is an error, it is recommended to provide us with a screenshot of the error.
It is recommended to provide us with a picture or video of the problem.
This is our source code link:

Hi,

Sorry I was not clear.

I am referring to the Do Preset Action under Easy Coding.

I says that… ‘Some commonly used actions have been pre-written in PiDog’s library. You can call the following function to make PiDog do these actions directly.

Pidog.do_action(action_name, step_count=1, speed=50)

What follows is a list of those preset actions.’

I run the example which I copied under /Pidog/Examples as Serie_Actions.py:

from pidog import Pidog

import time

my_dog = Pidog()

try:

pushup

my_dog.do_action(“half_sit”, speed=60)

my_dog.do_action(“pushup”, step_count=10, speed=60)

my_dog.wait_all_done()

act cute

my_dog.do_action(“sit”, speed=60)

my_dog.do_action(“wag_tail”, step_count=100,speed=90)

my_dog.do_action(“tilting_head”, step_count=5, speed=20)

my_dog.wait_head_done()

my_dog.stop_and_lie()

except KeyboardInterrupt:

pass

except Exception as e:

print(f"\033[31mERROR: {e}\033[m")

finally:

print(“closing …”)

my_dog.close()

The result is the following. It seems to be looking for the preset action ‘pushup’ but fail to invoke it from the library.

All connections are correct.

Thank you

Daniel Marion

It’s push_up, with underscore

Thank you. I will make the change.

Since this problem is known since 2 years, would it not be easier to modify the source code in the example. Ditto for other errors.

Daniel Marion

I’m very sorry, in our pidog source code, it is push_up.

You can check our source code link.
What are the problems with other sample codes? It is recommended to describe them in detail.

I’m very sorry, in our pidog source code, it is push_up.

You can check our source code link.
What are the problems with other sample codes? It is recommended to describe them in detail.

It might be on GitHub, but in the online documentation, the example of Sunfounder/Pidog Kit 1.0 Documentation /Play with Python/ 4. EasyCoding/ 6. Do Preset Action, the push_up is written as pushup. Please check the attached copy of that page.

Thank you.

(Attachment Pushup Example Code.pdf is missing)

It might be on GitHub, but in the online documentation, the example of Sunfounder/Pidog Kit 1.0 Documentation /Play with Python/ 4. EasyCoding/ 6. Do Preset Action, the push_up is written as pushup. Please check the following copy of that page.

We are very sorry, there is an error in our tutorial. Please refer to the github source code.
We will modify the tutorial as soon as possible.