Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gwalck committed Aug 4, 2023
1 parent 97c889a commit aefd00d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class AdmittanceRule
* Calculates the admittance rule from given the robot's current joint angles. The admittance
* controller state input is updated with the new calculated values. A boolean value is returned
* indicating if any of the kinematics plugin calls failed.
* \param[in] admittance_state contains all the information needed to calculate
* \param[in] admittance_state contains all the information needed to calculate
* the admittance offset
* \param[in] dt controller period
* \param[out] success true if no calls to the kinematics interface fail
Expand Down
4 changes: 2 additions & 2 deletions admittance_controller/test/test_admittance_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ TEST_F(AdmittanceControllerTest, publish_status_success)
EXPECT_NEAR(msg.wrench_base.wrench.force.x, 0.0, 0.03);
EXPECT_NEAR(msg.wrench_base.wrench.force.y, 0.0, 0.03);
EXPECT_NEAR(msg.wrench_base.wrench.force.z, 23.0, 0.03);
EXPECT_NEAR(msg.wrench_base.wrench.torque.x, 0.1*23, 0.03);
EXPECT_NEAR(msg.wrench_base.wrench.torque.x, 0.1 * 23, 0.03);
EXPECT_NEAR(msg.wrench_base.wrench.torque.y, 0.0, 0.03);
EXPECT_NEAR(msg.wrench_base.wrench.torque.z, 0.0, 0.03);

Expand All @@ -268,7 +268,7 @@ TEST_F(AdmittanceControllerTest, compensation_success)
ASSERT_EQ(controller_->on_configure(rclcpp_lifecycle::State()), NODE_SUCCESS);
ASSERT_EQ(controller_->on_activate(rclcpp_lifecycle::State()), NODE_SUCCESS);
// set the force on the force torque sensor to simulate gravity pulling
fts_state_values_ = {0.0, 0.0, -23.0, -0.1*23, 0, 0.0};
fts_state_values_ = {0.0, 0.0, -23.0, -0.1 * 23, 0, 0.0};
broadcast_tfs();
ASSERT_EQ(
controller_->update(rclcpp::Time(0), rclcpp::Duration::from_seconds(0.01)),
Expand Down
6 changes: 3 additions & 3 deletions admittance_controller/test/test_admittance_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class AdmittanceControllerTest : public ::testing::Test
transform_stamped.transform.rotation.y = 0;
transform_stamped.transform.rotation.z = 0;
transform_stamped.transform.rotation.w = 1;

transform_stamped.child_frame_id = ik_tip_frame_;
// world to kinematic tip frame
br.sendTransform(transform_stamped);
Expand Down Expand Up @@ -290,8 +290,8 @@ class AdmittanceControllerTest : public ::testing::Test
auto subs_callback = [&](const ControllerStateMsg::SharedPtr) {};
std::string topic = controller_->get_node()->get_name();
topic += "/status";
auto subscription = test_subscription_node_->create_subscription<ControllerStateMsg>(
topic, 10, subs_callback);
auto subscription =
test_subscription_node_->create_subscription<ControllerStateMsg>(topic, 10, subs_callback);

// call update to publish the test value
ASSERT_EQ(
Expand Down
6 changes: 3 additions & 3 deletions admittance_controller/test/test_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ test_admittance_controller:
name: "gravity_compensation"
params:
world_frame: "fixed_world_frame"
sensor_frame: "ft_mount"
sensor_frame: "ft_mount"
CoG:
pos: [0.0, 0.1, 0.0] # in sensor_frame
force: [0.0, 0.0, -23.0] # -gravity_acc * mass in world_frame
Expand Down Expand Up @@ -168,7 +168,7 @@ test_admittance_controller_no_mass:
name: "gravity_compensation"
params:
world_frame: "fixed_world_frame"
sensor_frame: "ft_mount"
sensor_frame: "ft_mount"
CoG:
pos: [0.0, 0.0, 0.0] # in sensor_frame
force: [0.0, 0.0, 0.0] # -gravity_acc * mass in world_frame
Expand Down Expand Up @@ -211,4 +211,4 @@ test_admittance_controller_no_mass:
- 214.3
- 214.4
- 214.5
- 214.6
- 214.6

0 comments on commit aefd00d

Please sign in to comment.