Before this skill can be used, the local environment must be configured.
```bash
source /opt/ros/
source ~/my_ros_ws/install/setup.bash
```
```bash
./scripts/setup.sh
```
Use this skill to modify the ros2_control graph.
You can use it to load, configure, start, stop, and switch controllers.
SECURITY CONSTRAINT: You must ALWAYS use the safe wrapper script located at ./scripts/safe_ros2_control_execution.py.
This script uses Python's subprocess (shell=False) to prevent command injection and validates the command against a strict allowlist.
Wrapper Path: Resolve ./scripts/safe_ros2_control_execution.py against this SKILL.md directory.
Usage: ./scripts/safe_ros2_control_execution.py
load_controllerreload_controller_librariesset_controller_stateset_hardware_component_stateswitch_controllersunload_controllercleanup_controllerExamples:
./scripts/safe_ros2_control_execution.py load_controller joint_trajectory_controller -c /controller_manager
./scripts/safe_ros2_control_execution.py set_controller_state joint_trajectory_controller active -c /controller_manager
./scripts/safe_ros2_control_execution.py switch_controllers --activate joint_trajectory_controller --deactivate position_controller -c /controller_manager
./scripts/safe_ros2_control_execution.py load_controller my_ctrl -c /my_manager --profile outdoor_tuning
共 1 个版本