Skip to content

Commit

Permalink
Clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyZe committed Nov 9, 2020
1 parent ad58940 commit f9c9432
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "hardware_interface/types/hardware_interface_status_values.hpp"
#include "hardware_interface/visibility_control.h"

// ROS
#include "rclcpp/macros.hpp"

using hardware_interface::HardwareInfo;
Expand Down Expand Up @@ -75,7 +76,6 @@ class URHardwareInterface final : public hardware_interface::components::SystemI
HardwareInfo info_;
status status_;
std::vector<double> joint_angle_commands_, current_joint_angles_;

};

} // namespace ur_robot_driver
28 changes: 14 additions & 14 deletions ur_robot_driver/src/hardware_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@

namespace ur_robot_driver
{
hardware_interface::return_type URHardwareInterface::configure(const HardwareInfo& system_info)
{
info_ = system_info;
status_ = status::CONFIGURED;
hardware_interface::return_type URHardwareInterface::configure(const HardwareInfo& system_info)
{
info_ = system_info;
status_ = status::CONFIGURED;

current_joint_angles_.resize(info_.joints.size(), std::numeric_limits<double>::quiet_NaN());
joint_angle_commands_.resize(info_.joints.size(), std::numeric_limits<double>::quiet_NaN());
current_joint_angles_.resize(info_.joints.size(), std::numeric_limits<double>::quiet_NaN());
joint_angle_commands_.resize(info_.joints.size(), std::numeric_limits<double>::quiet_NaN());

for (const hardware_interface::ComponentInfo & joint : info_.joints)
for (const hardware_interface::ComponentInfo& joint : info_.joints)
{
if (joint.type.compare("ros2_control_components/PositionJoint") != 0)
{
if (joint.type.compare("ros2_control_components/PositionJoint") != 0)
{
status_ = status::UNKNOWN;
return return_type::ERROR;
}
status_ = status::UNKNOWN;
return return_type::ERROR;
}

return return_type::OK;
}

return return_type::OK;
}
} // namespace ur_robot_driver

0 comments on commit f9c9432

Please sign in to comment.