Add a new motor in Pypot

Hello,
For a scholar project, we want to add a motor in poppy’s left arm to control his fingers. I already saw that adding a motor in Pypot is possible but I really don’t how to do this.
Is somebody could tell me which code lines I have to add in Pypot and where do I have to add these lines ?
Thanks
Tanguy

Hello,

Pypot use a ‘.json’ file to setup its motor configuration.
For example:
https://github.com/poppy-project/Poppy_bras/blob/master/poppy_right_arm/configuration/poppy_right_arm.json

The first step is to find where you have installed your json config file, then open it and append a motor configuration in the ‘motors’ section.

Thanks
So if I put this file in Pypot, it will find 5 motors in my arms ?
{
“controllers”: {
“upper_body_controller”: {
“sync_read”: false,
“attached_motors”: [
“r_arm”
],
“port”: “auto”
}

},
“motorgroups”: {
“r_arm”: [
“r_shoulder_y”,
“r_shoulder_x”,
“r_arm_z”,
“r_elbow_y”
“r_wrist_y”
]
},
“motors”: {
“r_arm_z”: {
“offset”: 0.0,
“type”: “MX-28”,
“id”: 53,
“angle_limit”: [
-90,
90
],
“orientation”: “indirect”
},
“r_shoulder_x”: {
“offset”: 90.0,
“type”: “MX-28”,
“id”: 52,
“angle_limit”: [
-110,
105
],
“orientation”: “indirect”
},
“r_shoulder_y”: {
“offset”: 90,
“type”: “MX-28”,
“id”: 51,
“angle_limit”: [
-155,
120
],
“orientation”: “indirect”
},
“r_elbow_y”: {
“offset”: 0.0,
“type”: “MX-28”,
“id”: 54,
“angle_limit”: [
0,
147
],
“orientation”: “indirect”

}
  "r_wrist_y": {
  "offset": 0.0,
  "type": "AX-12A",
  "id": 55,
  "angle_limit": [
    -90,
    90
  ],
  "orientation": "indirect"

}

}
}

Correct

If you need more explanation look at this documentation about controllers. It explains how modifiy the configuration file.
http://poppy-project.github.io/pypot/controller.html

Be strong ! You will move this arm ! :smile: