Skip to content

Commit 8a02c36

Browse files
authored
fmt & updated TODOs comments
1 parent c2d186b commit 8a02c36

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

robotiq_hande_driver/bringup/config/hande_controller.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This is an example configuration file for the controller_manager node.
2+
# YOU CAN NOT USE IT IN YOUR APPLICATION WITHOUT CHANGES
13
/**:
24
controller_manager:
35
ros__parameters:

robotiq_hande_driver/hardware/include/robotiq_hande_driver/hande_hardware_interface.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#define ROBOTIQ_HANDE_DRIVER__HANDE_HARDWARE_INTERFACE_HPP_
33

44
#include <string>
5-
#include "rclcpp/rclcpp.hpp"
6-
#include "hardware_interface/system_interface.hpp"
5+
#include <hardware_interface/system_interface.hpp>
6+
#include <rclcpp/rclcpp.hpp>
77

88
namespace robotiq_hande_driver {
99

@@ -35,7 +35,7 @@ class RobotiqHandeHardwareInterface : public HWI::SystemInterface
3535
rclcpp::Logger get_logger() const { return *logger_; }
3636

3737
private:
38-
//TODO: composition of the modbus communication
38+
//TODO(modbus integration): composition of the modbus communication
3939
std::shared_ptr<rclcpp::Logger> logger_;
4040

4141
std::string tty_port_;

robotiq_hande_driver/hardware/src/hande_hardware_interface.cpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
#include <fmt/core.h>
1+
#include "robotiq_hande_driver/hande_hardware_interface.hpp"
2+
23
#include <hardware_interface/types/hardware_interface_type_values.hpp>
34
#include <rclcpp/rclcpp.hpp>
45

5-
#include "robotiq_hande_driver/hande_hardware_interface.hpp"
6-
76
namespace robotiq_hande_driver {
87

98
RobotiqHandeHardwareInterface::RobotiqHandeHardwareInterface() {}
@@ -21,20 +20,20 @@ HWI::CallbackReturn RobotiqHandeHardwareInterface::on_init(const HWI::HardwareIn
2120
logger_ = std::make_shared<rclcpp::Logger>(
2221
rclcpp::get_logger("controller_manager.resource_manager.hardware_component.system.RobotiqHandeHardwareInterface"));
2322

24-
//TODO: Set parameters for the modbus communication
23+
//TODO(modbus integration): Set parameters for the modbus communication
2524

2625
RCLCPP_INFO(get_logger(), "Initialized ModbusRTU for %s", tty_port_.c_str());
2726
return HWI::CallbackReturn::SUCCESS;
2827
}
2928

3029
HWI::CallbackReturn RobotiqHandeHardwareInterface::on_configure(const rlccp_lc::State& /*previous_state*/){
31-
//TODO: Initialize the ModbusRTU communication session
30+
//TODO(modbus integration): Initialize the ModbusRTU communication session
3231
RCLCPP_INFO(get_logger(), "configure()");
3332
return HWI::CallbackReturn::SUCCESS;
3433
}
3534

3635
HWI::CallbackReturn RobotiqHandeHardwareInterface::on_cleanup(const rlccp_lc::State& /*previous_state*/){
37-
//TODO: Deinitalize the ModbusRTU session
36+
//TODO(modbus integration): Deinitalize the ModbusRTU session
3837
RCLCPP_INFO(get_logger(), "cleanup()");
3938
return HWI::CallbackReturn::SUCCESS;
4039
}
@@ -62,37 +61,37 @@ std::vector<HWI::CommandInterface> RobotiqHandeHardwareInterface::export_command
6261
}
6362

6463
HWI::CallbackReturn RobotiqHandeHardwareInterface::on_activate(const rlccp_lc::State& /*previous_state*/){
65-
//TODO: Power on the gripper (activation)
64+
//TODO(modbus integration): Power on the gripper (activation)
6665
RCLCPP_INFO(get_logger(), "activate()");
6766
return HWI::CallbackReturn::SUCCESS;
6867
}
6968

7069
HWI::CallbackReturn RobotiqHandeHardwareInterface::on_deactivate(const rlccp_lc::State& /*previous_state*/){
71-
//TODO: Deactiavte the gripper (set the reset flag)
70+
//TODO(modbus integration): Deactiavte the gripper (set the reset flag)
7271
RCLCPP_INFO(get_logger(), "deactivate()");
7372
return HWI::CallbackReturn::SUCCESS;
7473
}
7574

7675
HWI::CallbackReturn RobotiqHandeHardwareInterface::on_shutdown(const rlccp_lc::State& /*previous_state*/){
77-
//TODO: Deactivate the gripper, deinitalize the modbus RTU session,
76+
//TODO(modbus integration): Deactivate the gripper, deinitalize the modbus RTU session,
7877
RCLCPP_INFO(get_logger(), "shutdown()");
7978
return HWI::CallbackReturn::SUCCESS;
8079
}
8180

8281
HWI::CallbackReturn RobotiqHandeHardwareInterface::on_error(const rlccp_lc::State& /*previous_state*/){
83-
//TODO: Placeholder for error handling
82+
//TODO(modbus integration): Placeholder for error handling
8483
RCLCPP_INFO(get_logger(), "Handled error");
8584
return HWI::CallbackReturn::SUCCESS;
8685
}
8786

8887
HWI::return_type RobotiqHandeHardwareInterface::read(const rclcpp::Time& /*time*/,
8988
const rclcpp::Duration& /*period*/) {
90-
//TODO: data = driver_->receive_data();
89+
//TODO(modbus integration): data = driver_->receive_data();
9190
return hardware_interface::return_type::OK;
9291
}
9392
HWI::return_type RobotiqHandeHardwareInterface::write(const rclcpp::Time& /*time*/,
9493
const rclcpp::Duration& /*period*/) {
95-
//TODO: driver_->send_data(cmd_position_);
94+
//TODO(modbus integration): driver_->send_data(cmd_position_);
9695
return hardware_interface::return_type::OK;
9796
}
9897

0 commit comments

Comments
 (0)