This document focuses on compile/build risks and runtime validation for the Simco EtherCAT path.
Top 10 Most Probable Issues (Ranked)
diff_drive_controllercmd_vel type mismatch.teleop_twist_keyboardis run withstamped:=true, but the controller config does not enable stamped input.zed_wrapperinclude is unconditional inmy_robot.launch.xml. If the package is missing, the launch fails before ros2_control is usable.- Xacro path resolution for slave config uses
$(find ...)instead of$(find-pkg-share ...)in ROS 2, which can break runtime parameter resolution. - EtherCAT master privileges or device access missing.
ethercattools and real-time network interface often require root and udev rules. - Mixed hardware definitions. The URDF includes
simco_ros2_control.xacroby default, but developers may expect mock or Arduino without updating config. - EtherCAT slave config mismatch. Wrong vendor/product IDs or PDO mappings prevent drive enable or velocity control.
- Controller activation vs hardware interface availability. Controller can be active while command interfaces are not claimed or unavailable.
- ROS 2 dependencies not installed (
ros2_control, controllers, teleop, ethercat tools), leading to build or launch errors. - Joint naming mismatches between URDF and controller YAML prevent the controller from binding to interfaces.
- Controller update rate vs hardware control frequency mismatch can lead to timeouts or unstable behavior.
Environment Prerequisites
- Source ROS 2 Humble.
- Ensure required OS packages are installed.
Commands:
source /opt/ros/humble/setup.bash
sudo apt update
sudo apt install -y \
ros-humble-ros2-control \
ros-humble-ros2-controllers \
ros-humble-teleop-twist-keyboard \
ros-humble-xacro \
ethercat-masterBuild and Dependency Checks
- Clean previous artifacts.
- Build the workspace and source it.
Commands:
cd /Users/giuliomastromartino/Documents/Polispace/RovertechGit/ros2_control
rm -rf build install log
colcon build --symlink-install
source install/setup.bashController Bringup Checks
- Launch without ZED to isolate ros2_control.
- Confirm controllers are active.
- Confirm hardware interfaces are available and claimed.
- Confirm
cmd_veltopic type.
Commands:
ros2 launch my_robot_bringup my_robot.launch.xmlros2 control list_controllers
ros2 control list_hardware_interfaces
ros2 topic info /diff_drive_controller/cmd_velEtherCAT Hardware Checks
- Confirm EtherCAT master can see devices.
- Check slave states.
Commands:
sudo ethercat master
sudo ethercat slaves
sudo ethercat stateCommanded Motion Verification
- Publish a
Twistcommand if the controller expectsgeometry_msgs/msg/Twist. - Publish a
TwistStampedcommand if the controller expectsgeometry_msgs/msg/TwistStamped.
Commands (Twist):
ros2 topic pub /diff_drive_controller/cmd_vel geometry_msgs/msg/Twist \
"{linear: {x: 0.2, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}" -r 5Commands (TwistStamped):
ros2 topic pub /diff_drive_controller/cmd_vel geometry_msgs/msg/TwistStamped \
"{header: {stamp: {sec: 0, nanosec: 0}, frame_id: ''}, twist: {linear: {x: 0.2, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}}" -r 5Troubleshooting Aids
- Increase ros2_control logging.
- Capture driver logs.
Commands:
ros2 launch my_robot_bringup my_robot.launch.xml --ros-args --log-level debug
ros2 topic echo /rosout