- Introduced `rclcpp::Logger` for consistent logging throughout `RbsServoActuator`.
- Renamed joint state and command variables to `hw_joint_angle`, `hw_joint_velocity`, `hw_joint_target_angle`, and `hw_joint_target_velocity` for clarity.
- Added parameters `can_interface` and `can_node_id`, allowing configurable CAN interface and node ID.
- Enhanced CAN initialization and error handling in `on_init` to properly retrieve interface index and bind the socket.
- Implemented structured CAN message handling:
- Sends activation command when the actuator is enabled.
- Reads and logs incoming CAN frames for joint state updates.
- Ensures error handling for failed read/write operations.
- Updated URDF (`simple_robot.urdf`) to include `can_interface` and `can_node_id` parameters for hardware configuration.
- Improved error handling in `python_enable_motor.py` by capturing and displaying exception details.
- Ensured proper CAN bus shutdown in `python_enable_motor.py` with a `finally` block.
- Refactored `python_send_angle.py` to accept a command-line argument for the target angle instead of looping indefinitely.
- Refactored `python_send_velocity.py` to accept a command-line argument for target speed and removed infinite loops for better usability.
- Added `send_velocity_impulses.py`, a new script to send alternating velocity impulses over the CAN bus.
- Changed `monitor_speed` in `platformio.ini` from `115200` to `19200` for compatibility.
- Initialized `MotorControlInputs` struct members with default values.
- Uncommented digital write operations in `doMotor` for proper execution.
- Disabled debug output and monitoring configurations for cleaner operation.
- Adjusted motor tuning parameters by commenting out specific settings.
- Changed `Serial.begin(115200)` to `Serial.begin(19200)` in `setup()` to match the new monitor speed.
- Commented out `_delay(1000)` and `current_angle` variable to remove unnecessary delays and unused code.
- Added a README file containing instructions for using the Python scripts to test and interact with a CAN bus system.
- Included details on prerequisites, usage, configuration, and troubleshooting.
- Provided step-by-step guidance for running each script, including arguments and behavior.
- Created `python_can.py`:
- Implements a CAN message receiver that processes angle, velocity, and enable/disable flags.
- Added `python_enable_motor.py`:
- Sends enable/disable commands to the motor via CAN.
- Added `python_send_angle.py`:
- Sends target angle commands over the CAN bus.
- Added `python_send_velocity.py`:
- Sends target velocity commands over the CAN bus.
- Configured all scripts to use `python-can` library with `socketcan` interface for CAN communication.
- Introduced `MotorControlInputs` struct to centralize motor control state.
- Renamed `sensor` to `encoder` for clarity in naming conventions.
- Added `send_velocity`, `send_angle`, and `send_motor_enabled` functions for modular CAN message handling.
- Updated `setup_foc` to enhance motor initialization with configurable parameters.
- Replaced `run_foc` with `foc_step` for improved motor control logic:
- Dynamically switches between angle and velocity control based on inputs.
- Enhanced CAN message handling with `read_can_step` to process specific control commands.
- Adjusted current sensing and other configuration values for precision.
- Added placeholders for temperature sensor setup and handling.
- Added `.clang-tidy` with custom checks to enforce code style.
- Created `.clangd` with specific compile flag additions and removals.
- Updated `.gitignore` to include new cache, metadata, and configuration files.
- Updated `platformio.ini`:
- Bumped `Simple FOC` to version 2.3.4 and `STM32_CAN` to version 1.1.2.
- Added `gen_compile_commands.py` as an extra script.