Skip to content

Commit

Permalink
PantherImu -> PhidgetImu
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Sep 24, 2024
1 parent f82a2b2 commit 720bf72
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 127 deletions.
10 changes: 5 additions & 5 deletions husarion_ugv_hardware_interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pkg_check_modules(LIBGPIOD REQUIRED IMPORTED_TARGET libgpiodcxx)

add_library(
${PROJECT_NAME} SHARED
src/panther_imu_sensor/panther_imu_sensor.cpp
src/phidget_imu_sensor/phidget_imu_sensor.cpp
src/panther_system/gpio/gpio_controller.cpp
src/panther_system/gpio/gpio_driver.cpp
src/panther_system/robot_driver/canopen_manager.cpp
Expand Down Expand Up @@ -96,12 +96,12 @@ if(BUILD_TESTING)

ament_add_gtest(${PROJECT_NAME}_test_utils test/test_utils.cpp src/utils.cpp)

ament_add_gtest(${PROJECT_NAME}_test_panther_imu_sensor
test/panther_imu_sensor/test_panther_imu_sensor.cpp)
ament_add_gtest(${PROJECT_NAME}_test_phidget_imu_sensor
test/phidget_imu_sensor/test_phidget_imu_sensor.cpp)
ament_target_dependencies(
${PROJECT_NAME}_test_panther_imu_sensor hardware_interface rclcpp
${PROJECT_NAME}_test_phidget_imu_sensor hardware_interface rclcpp
husarion_ugv_utils panther_msgs phidgets_api)
target_link_libraries(${PROJECT_NAME}_test_panther_imu_sensor ${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}_test_phidget_imu_sensor ${PROJECT_NAME}
phidgets_spatial_parameters)

ament_add_gtest(
Expand Down
2 changes: 1 addition & 1 deletion husarion_ugv_hardware_interfaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ LynxSystem additional CAN settings
> [!CAUTION]
> `max_write_pdo_cmds_errors_count`, `max_read_pdo_motor_states_errors_count`, `max_read_pdo_driver_state_errors_count`, `sdo_operation_timeout`, `pdo_motor_states_timeout_ms` and `pdo_driver_state_timeout_ms` are safety-critical parameters, they should be changed only in very specific cases, be sure that you know how they work and be really cautious when changing them.
### PantherImuSensor
### PhidgetImuSensor

Plugin responsible for communicating with IMU and filtering data using Madgwick Filter.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</description>
</class>

<class name="husarion_ugv_hardware_interfaces/PantherImuSensor"
type="husarion_ugv_hardware_interfaces::PantherImuSensor"
<class name="husarion_ugv_hardware_interfaces/PhidgetImuSensor"
type="husarion_ugv_hardware_interfaces::PhidgetImuSensor"
base_class_type="hardware_interface::SensorInterface">
<description>
Hardware IMU sensor for Panther's Phidget Spatial Inertial Measurement Unit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef HUSARION_UGV_HARDWARE_INTERFACES_PANTHER_IMU_SENSOR_PANTHER_IMU_SENSOR_HPP_
#define HUSARION_UGV_HARDWARE_INTERFACES_PANTHER_IMU_SENSOR_PANTHER_IMU_SENSOR_HPP_
#ifndef HUSARION_UGV_HARDWARE_INTERFACES_PHIDGET_IMU_SENSOR_PHIDGET_IMU_SENSOR_HPP_
#define HUSARION_UGV_HARDWARE_INTERFACES_PHIDGET_IMU_SENSOR_PHIDGET_IMU_SENSOR_HPP_

#include <array>
#include <condition_variable>
Expand Down Expand Up @@ -54,10 +54,10 @@ using CommandInterface = hardware_interface::CommandInterface;
/**
* @brief Class that implements SensorInterface from ros2_control for Panther
*/
class PantherImuSensor : public hardware_interface::SensorInterface
class PhidgetImuSensor : public hardware_interface::SensorInterface
{
public:
RCLCPP_SHARED_PTR_DEFINITIONS(PantherImuSensor)
RCLCPP_SHARED_PTR_DEFINITIONS(PhidgetImuSensor)

CallbackReturn on_init(const hardware_interface::HardwareInfo & hardware_info) override;
CallbackReturn on_configure(const rclcpp_lifecycle::State & previous_state) override;
Expand Down Expand Up @@ -143,7 +143,7 @@ class PantherImuSensor : public hardware_interface::SensorInterface

std::vector<double> imu_sensor_state_;

rclcpp::Logger logger_{rclcpp::get_logger("PantherImuSensor")};
rclcpp::Logger logger_{rclcpp::get_logger("PhidgetImuSensor")};
rclcpp::Clock steady_clock_{RCL_STEADY_TIME};

inline static const std::array<std::string, kImuInterfacesSize> kImuInterfacesNames = {
Expand Down Expand Up @@ -182,4 +182,4 @@ class PantherImuSensor : public hardware_interface::SensorInterface

} // namespace husarion_ugv_hardware_interfaces

#endif // HUSARION_UGV_HARDWARE_INTERFACES_PANTHER_IMU_SENSOR_PANTHER_IMU_SENSOR_HPP_
#endif // HUSARION_UGV_HARDWARE_INTERFACES_PHIDGET_IMU_SENSOR_PHIDGET_IMU_SENSOR_HPP_
Loading

0 comments on commit 720bf72

Please sign in to comment.