The first step to run the demo code, is to make sure the sensor_offset.json
is filled with your machine absolute encoder value,
instead of the value in this repository (may be different from your machine).
Every machine has its own home position encoder value, which should be set with the machine power on and the joint fixed at the pin position.
After you have finished the machine physical calibration process (move all joints to the pin position),
you can run the demo code in this repository, this demo code will record its absolute encoder value and stored in the sensor_offset.json
file.
python demo_set_home.py --rcs_config=./config/config_xxx.yaml
To have a better performance of the robot control system, we suggest disable the efficient cores of the computer.
To disable the efficient cores, you need to enter the BIOS of your computer, and disable the efficient core.
On GR1T1 and GR1T2, you can press the esc
key when the computer is booting up to enter the BIOS.
In the BIOS, you can find the efficient core setting, and set the number of efficient cores to 0.
Different robot models have different configurations, and the demo code is divided into different parts according to the robot model.
But all config files are all in the config
folder.
When you run the demo code, you should specify the config file in the command line.
run demo with following command:
python demo_xxx.py --rcs_config=./config/config_GR1_T1.yaml
run demo with following command:
python demo_xxx.py --rcs_config=./config/config_GR1_T2.yaml
This demo script establishes a control system for a robotic unit, setting a desired control frequency, managing the robot state, and executing control commands based on this state. The control loop is configured to run indefinitely, continuously adjusting the robot's parameters in real time.
Imports and Setup:
Control System Initialization:
50Hz
is defined, meaning the control loop will execute 50 times per second.ControlSystem().dev_mode()
.Main Control Loop:
Real-Time Control:
Modularity and Customization:
Development Mode:
Potential Improvements
To run the demo, execute the script using the command:
python demo.py --rcs_config=./config/config_xxx.yaml
This demo script demonstrates how to print the robot's state information, including IMU data, joint data, and base data. The script continuously prints the state information in the console, providing real-time feedback on the robot's status.
To run the demo, execute the script using the command:
python demo_print_state.py --rcs_config=./config/config_xxx.yaml
This demo script demonstrates how to set the robot's home position by recording the current joint positions as the home position.
To run the demo, execute the script using the command:
python demo_set_home.py --rcs_config=./config/config_xxx.yaml
This demo script demonstrates how to turn off the robot's servo motors, effectively disabling the robot's movement. The script sends a command to turn off the servo motors. Once the motors are off, the robot will lie down and please make sure the robot is in a safe position.
To run the demo, execute the script using the command:
python demo_servo_off.py --rcs_config=./config/config_xxx.yaml
This demo script demonstrates how to turn on the robot's servo motors, enabling the robot to move. The script sends a command to turn on the servo motors. Once the motors are on, all motors will be in high impedance mode, and the robot can be controlled.
To run the demo, execute the script using the command:
python demo_servo_on.py --rcs_config=./config/config_xxx.yaml
This demo script demonstrates how to make the robot move to the default standing position. The script sends commands to set the desired joint positions for the robot to move.
To run the demo, execute the script using the command:
python demo_move_position.py --rcs_config=./config/config_xxx.yaml
Notice:
- Currently, the RL demo codes are still under development, and the walking demo is not stable.
- The RL demo codes right now is just a simple demo to show how to use the RL algorithm to control the robot.
- We just want to provide a simplest demo to show how to use the RL algorithm to control the robot.
- Its performance is not good enough, we are working on it to improve the performance.
To run the rl demo codes (rl_stand.py
and rl_walk.py
), you should follow the steps below:
demo_rl_stand.py
to make the robot stand up.demo_rl_walk.py
to make the robot walk.Before you run the demo code demo_rl_walk.py
, you should run the demo_rl_stand.py
to make the robot stand up.
To run the demo, execute the script using the command:
python demo_rl_stand.py --rcs_config=./config/config_xxx.yaml
This demo code outlines a sophisticated control loop for a robotic system, incorporating reinforcement learning to determine target joint positions. It ensures real-time control with accurate sensor feedback and adaptable timing management. This framework provides a robust foundation for further development and refinement of robotic control systems.
Imports and Setup
Module Imports:
Version Information:
Control System Initialization:
50Hz
, defining the robot control loop's execution rate.ControlSystem().dev_mode()
.Main Control Loop
State Update:
RL Algorithm (algorithm_rl_walk):
Control Commands:
Control Execution:
Timing Management:
RL Algorithm Functions
Load Actor Model:
Compute Observations and Actions:
Update Joint Target Positions:
To run the demo, execute the script using the command:
python demo_rl_walk.py --rcs_config=./config/config_xxx.yaml
More information about Robot_RCS and Robot_RCS_GR framework:
(Still in progress... 💪🏻)
The print level of the information are separated into 5 levels:
Thank you for your interest in the Fourier Intelligence GRx Robot Repositories. We hope you find this resource helpful in your robotics projects!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。