Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Dhruv2012/Autonomous-Farm-Robot/llms.txt
Use this file to discover all available pages before exploring further.
agribot_control configures the ROS control layer for AGRIBOT’s four-wheel skid-steer drivetrain. It uses ros_control effort controllers with PID tuning for each wheel joint, and a joint state controller for publishing current joint positions and velocities. The package contains a single YAML configuration file and one launch file — all the logic lives in the ros_control framework itself, which the configuration wires together.
Controller Configuration
The fullagribot_control.yaml is shown below. It defines five controllers under the /agribot namespace: one joint state controller and four per-wheel effort controllers, one for each corner of the skid-steer chassis.
PID Parameter Reference
| Parameter | Value | Description |
|---|---|---|
p (Proportional) | 100.0 | Main torque output per unit error — high value enables fast response to velocity commands |
i (Integral) | 0.1 | Eliminates steady-state error; kept low to avoid windup on a wheel that is momentarily slipping |
d (Derivative) | 10.0 | Dampens oscillation from the high proportional gain |
publish_rate | 50 Hz | Rate at which joint_state_controller publishes to /agribot/joint_states |
Launching the Controllers
- Loads parameters —
rosparamuploadsagribot_control.yamlto the ROS parameter server under the/agribotnamespace. - Spawns controllers —
controller_manager/spawnerstarts all five controllers inside the/agribotnamespace:joint_state_controllerrightwheelR_effort_controllerleftwheelR_effort_controllerrightwheelF_effort_controllerleftwheelF_effort_controller
robot_description, ensuring the hardware interface and URDF are consistent when starting controllers standalone (outside of my_world.launch).
Joint Names
The four joints controlled by the effort controllers map directly to the joints defined inagribot_body.urdf.xacro. The joint_names_agribot.yaml config file records these names for tooling that needs to enumerate controllable joints:
| Joint Name | Position |
|---|---|
base_link_to_left_wheel_F_joint | Front-left wheel |
base_link_to_right_wheel_F_joint | Front-right wheel |
base_link_to_left_wheel_R_joint | Rear-left wheel |
base_link_to_right_wheel_R_joint | Rear-right wheel |
continuous (unbounded rotation), which is required for driven wheels. The effort_controllers/JointEffortController accepts a torque command in Newton-metres on the topic /agribot/<controller_name>/command.
The skid-steer drive plugin (
libgazebo_ros_skid_steer_drive.so) directly subscribes to /agribot/cmd_vel and handles differential drive kinematics internally — it bypasses the effort controllers entirely during normal autonomous navigation. The effort controllers are used for direct joint-level control, hardware-in-the-loop testing, and scenarios where precise torque commands are needed per wheel.