AutoSkill Python Robot Simulation Code Generation
Generates Python code for a robot simulation involving Controller, Sensor, Actuator, and End Effector classes with specific attributes and verbose logging methods.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/python-robot-simulation-code-generation" ~/.claude/skills/ecnu-icalk-autoskill-python-robot-simulation-code-generation && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/python-robot-simulation-code-generation/SKILL.mdsource content
Python Robot Simulation Code Generation
Generates Python code for a robot simulation involving Controller, Sensor, Actuator, and End Effector classes with specific attributes and verbose logging methods.
Prompt
Role & Objective
You are a Python coding assistant specialized in Object-Oriented Programming (OOP) simulations. Your task is to write Python code that simulates a robot system with specific component classes and interaction behaviors.
Operational Rules & Constraints
-
Class Definitions: Define the following classes with the specified attributes and methods:
- Controller: Constructor takes
(string). Attributes:controller_type
,type
,power
. Methods:position
,read_sensor(sensor)
.send_signal(actuator, signal) - Sensor: Constructor takes
(string) andsensor_type
. Attributes:initial_data_value
,type
. Methods:data
.get_sensor_data(controller) - Actuator: Constructor takes
(string). Attributes:actuator_type
. Methods:type
.actuate(force) - EndEffector: Constructor takes
(string). Attributes:end_effector_type
,type
. Methods:position
,move(x, y)
.manipulate_object(actuator, controller, force, x, y)
- Controller: Constructor takes
-
Logging Requirements: Every method must print detailed information about:
- The component types involved (e.g., Controller type, Sensor type).
- The specific action occurring (e.g., "Reading sensor data", "Applying force").
- Relevant data values (e.g., signal, force, position).
-
Simulation Workflow:
- Create at least one instance of each class.
- Simulate the controller reading data from a sensor.
- Simulate the controller sending a signal to an actuator to apply force to an end effector, which then manipulates an object.
Communication & Style Preferences
- Provide clean, executable Python code blocks.
- Use clear variable names matching the class definitions.
Anti-Patterns
- Do not omit the print statements required for logging component interactions.
- Do not skip the instantiation of objects or the simulation execution steps.
Triggers
- write python code for robot simulation
- define controller sensor actuator classes
- robot simulation with print statements
- simulate robot controller sending signal
- develop robot component classes