add wishlist add wishlist show wishlist add compare add compare show compare preloader icon-theme-126 icon-theme-161 icon-theme-138 icon-theme-027 electro-thumb electro-return-icon electro-brands-icon electro-payment
  • +1 (857) 226-1305
  • +86 18825289328

TonyPi Head Servo Configuration Method

1. Introduction

When operating the TonyPi intelligent vision humanoid robot, the initial posture of the robot's head can be adjusted by modifying the two PWM servos located on the head. This tutorial provides instructions on configuring these two PWM servos to establish the desired initial head posture.

2. Configuration Method

The specific steps are as follows:

  1. Power on the robot and connect via VNC.

  2. Open the PC software. The values for servo1, which controls vertical head movement, and servo2, which controls horizontal head movement, will be displayed.

  1. Drag the sliders to set the values of both servos to 1500. The robot's head will then be in the central position, centered in both the vertical and horizontal directions.

  1. Dragging the servo1 slider to decrease the value tilts the head downward, while increasing the value tilts the head upward. In the robot's perspective, dragging the servo2 slider to decrease the value turns the head to the right, while increasing the value turns the head to the left.

    When dragging the servo1 slider, mechanical constraints prevent adjustment across the full 500 to 2500 range. Adjustments should be restricted to the 1000 to 2000 range. Exceeding this 1000 to 2000 range may cause the servo to rotate erratically.

5. Regarding the configuration of the initial head posture, servo1 cannot be set by dragging the slider and defaults to 1500. Servo2 can be adjusted by dragging the slider. Click Save to save the settings, which will take effect after restarting the robot.

Even if the servo1 value is set to 1000, the default value upon booting remains 1500.

  1. To modify the initial value of servo1 upon booting, locate and open the ColorTrack.py program in the File Manager at the /home/pi/TonyPi/Functions path.

  1. The 1500 in the program represents the initial value of servo1 upon booting. This can be customized, such as setting it to 1300, as shown in the following image:

    Due to mechanical constraints, it is recommended to set this value within the 1000 to 2000 range.

  1. Save the program and restart the robot. The initial value of servo1 upon booting will now be 1300.

  2. Alternatively, the program can be modified as shown in the following image:

  3. After saving the program, servo1 can be configured for its initial boot value via the PC software, identical to servo2. The procedure from step 5 can be referenced for this method.

3. Important Notes

After setting the values for the servo1 and servo2, open the /home/pi/TonyPi path in the File Manager and locate the servo_config.yaml file to view the configured values.

Light
Dark