Basic implementation of servos
With all of the dependencies installed, what comes next?
Now that you are in the Driving/ directory, let's take a look around. Run the command
lsAnd you'll see the following output:
Servos/ - The folder containing all servo configurations as a
.csvfiledynamixels.py - A file containing the
Dynamixelclass and setup utilitiesserver.py - A file that implements dynamixels.py by hosting a
UDPserver
Make a new file called <your name>Server.py with the following code:
touch <your name>Server.py
# For example, Bob would do
touch bobServer.pyNow that this file exists, you can start editing the code. Open the file in a text editor of your choice, or by using this command:
nano <your name>Server.pyFrom there, we can start creating the code to interface with the robot. Add the following line to the file you have just created:
from dynamixels import initialise_dynamixelThis will tell Python to include the initialise_dynamixel function for later use. Looking inside dynamixels.py, the definition of the function includes some information about its usage.
Last updated
Was this helpful?