Welcome to Rider Pi Robot repository
6. Car squats and shakes
Car squats and shakes
1. Experimental purpose
Drive the car to squat and sway left and right
2. Experimental path source code
Enter the car system, end the car program, enter "ip (ip is the car's ip): 8888" in the browser, enter the password "yahboom"
Then log in
Enter Rider-pi_class/3.Base Motion/6. Squatting and swaying the car from side to side and run car_sport.ipynb.
3. Experimental phenomenon
After running the code, drag the slider to control the car's squat and sway left and right.
The car cannot be in a stopped state (that is, not in a standing balance state), otherwise it cannot move.
Squat:

Sway left and right:

4. Analysis of main source code parameters
x#Body squat cycledef run_periodic(value):g_car.rider_periodic_z(value)#Create sliders to control the car Create four sliders to control the carinteract(run_periodic, \value=widgets.FloatSlider(min=0,max=4,step=0.5,value=0));#Sway left and rightdef run_roll(value):g_car.rider_periodic_roll(value)#Create sliders to control the car Create four sliders to control the Carinteract(run_roll, \value=widgets.FloatSlider(min=0,max=4,step=0.5,value=0));rider_periodic_z: This function controls the period of the car's squatting, 0: stop, other values squat at a certain frequency. rider_periodic_roll: This function controls the period of the car's left and right shaking, 0: stop, other values squat at a certain frequency.
In addition, these two actions can move at the same time