Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chained_filter_controller/test/test_chained_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ TEST_F(ChainedFilterTest, UpdateFilter)
controller_->update_and_write_commands(rclcpp::Time(), rclcpp::Duration::from_seconds(0.1)),
controller_interface::return_type::OK);
// input and output should have changed
EXPECT_EQ(joint_1_pos_->get_optional().value(), joint_states_[0]);
EXPECT_EQ(joint_1_pos_->get_optional().value(), 2.0);
EXPECT_EQ(state_if_exported_conf[0]->get_optional().value(), 1.55);
ASSERT_EQ(
controller_->update_and_write_commands(rclcpp::Time(), rclcpp::Duration::from_seconds(0.1)),
controller_interface::return_type::OK);
// output should have reached steady state (mean filter)
EXPECT_EQ(state_if_exported_conf[0]->get_optional().value(), joint_states_[0]);
EXPECT_EQ(state_if_exported_conf[0]->get_optional().value(), 2.0);
}

TEST_F(ChainedFilterTest, DeactivateSucceeds)
Expand Down
4 changes: 2 additions & 2 deletions chained_filter_controller/test/test_chained_filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ class ChainedFilterTest : public ::testing::Test

// dummy joint state values used for tests
const std::vector<std::string> joint_names_ = {"wheel_left"};
std::vector<double> joint_states_ = {1.1};
const std::vector<double> joint_states_ = {1.1};

StateInterface::SharedPtr joint_1_pos_ =
std::make_shared<StateInterface>(joint_names_[0], HW_IF_POSITION, &joint_states_[0]);
std::make_shared<StateInterface>(joint_names_[0], HW_IF_POSITION, "double", "1.1");
Comment on lines +57 to +60

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const std::vector<double> joint_states_ = {1.1};
StateInterface::SharedPtr joint_1_pos_ =
std::make_shared<StateInterface>(joint_names_[0], HW_IF_POSITION, &joint_states_[0]);
std::make_shared<StateInterface>(joint_names_[0], HW_IF_POSITION, "double", "1.1");
const std::vector<double> joint_states_ = {1.1};
StateInterface::SharedPtr joint_1_pos_ = std::make_shared<StateInterface>(
joint_names_[0], HW_IF_POSITION, "double", std::to_string(joint_states_[0]));

or remove the joint_states_ member (used twice in cpp)

rclcpp::executors::SingleThreadedExecutor executor;
};

Expand Down
18 changes: 9 additions & 9 deletions chained_filter_controller/test/test_multiple_chained_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,17 @@ TEST_F(MultipleChainedFilterTest, UpdateFilter_multiple_interfaces)
controller_->update_and_write_commands(rclcpp::Time(), rclcpp::Duration::from_seconds(0.1)),
controller_interface::return_type::OK);
// input and output should have changed
EXPECT_EQ(joint_1_pos_->get_optional().value(), joint_states_[0]);
EXPECT_EQ(joint_1_pos_->get_optional().value(), 2.0);
EXPECT_EQ(state_if_exported_conf[0]->get_optional().value(), 1.55);
EXPECT_EQ(joint_2_pos_->get_optional().value(), joint_states_[1]);
EXPECT_EQ(joint_2_pos_->get_optional().value(), 3.0);
EXPECT_EQ(state_if_exported_conf[1]->get_optional().value(), 2.6);

ASSERT_EQ(
controller_->update_and_write_commands(rclcpp::Time(), rclcpp::Duration::from_seconds(0.1)),
controller_interface::return_type::OK);
// output should have reached steady state (mean filter)
EXPECT_EQ(state_if_exported_conf[0]->get_optional().value(), joint_states_[0]);
EXPECT_EQ(state_if_exported_conf[1]->get_optional().value(), joint_states_[1]);
EXPECT_EQ(state_if_exported_conf[0]->get_optional().value(), 2.0);
EXPECT_EQ(state_if_exported_conf[1]->get_optional().value(), 3.0);
}

TEST_F(MultipleChainedFilterTest, UpdateFilter_multiple_interfaces_config_per_input)
Expand All @@ -175,27 +175,27 @@ TEST_F(MultipleChainedFilterTest, UpdateFilter_multiple_interfaces_config_per_in
controller_->update_and_write_commands(rclcpp::Time(), rclcpp::Duration::from_seconds(0.1)),
controller_interface::return_type::OK);
// input and output should have changed
EXPECT_EQ(joint_1_pos_->get_optional().value(), joint_states_[0]);
EXPECT_EQ(joint_1_pos_->get_optional().value(), 2.0);
EXPECT_EQ(state_if_exported_conf[0]->get_optional().value(), 1.55);
EXPECT_EQ(joint_2_pos_->get_optional().value(), joint_states_[1]);
EXPECT_EQ(joint_2_pos_->get_optional().value(), 2.8);
// second update call, mean of (2.2, 2.8)
EXPECT_EQ(state_if_exported_conf[1]->get_optional().value(), 2.5);

ASSERT_EQ(
controller_->update_and_write_commands(rclcpp::Time(), rclcpp::Duration::from_seconds(0.1)),
controller_interface::return_type::OK);
// output should have reached steady state for the first input (mean filter)
EXPECT_EQ(state_if_exported_conf[0]->get_optional().value(), joint_states_[0]);
EXPECT_EQ(state_if_exported_conf[0]->get_optional().value(), 2.0);
// third update call, mean of (2.2, 2.8, 2.8)
EXPECT_EQ(state_if_exported_conf[1]->get_optional().value(), 2.6);

ASSERT_EQ(
controller_->update_and_write_commands(rclcpp::Time(), rclcpp::Duration::from_seconds(0.1)),
controller_interface::return_type::OK);
// no change
EXPECT_EQ(state_if_exported_conf[0]->get_optional().value(), joint_states_[0]);
EXPECT_EQ(state_if_exported_conf[0]->get_optional().value(), 2.0);
// output should have reached steady state (mean filter)
EXPECT_NEAR(state_if_exported_conf[1]->get_optional().value(), joint_states_[1], 1e-5);
EXPECT_NEAR(state_if_exported_conf[1]->get_optional().value(), 2.8, 1e-5);
}

int main(int argc, char ** argv)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ class MultipleChainedFilterTest : public ::testing::Test

// dummy joint state values used for tests
const std::vector<std::string> joint_names_ = {"wheel_left", "wheel_right"};
std::vector<double> joint_states_ = {1.1, 2.2};
const std::vector<double> joint_states_ = {1.1, 2.2};

StateInterface::SharedPtr joint_1_pos_ =
std::make_shared<StateInterface>(joint_names_[0], HW_IF_POSITION, &joint_states_[0]);
std::make_shared<StateInterface>(joint_names_[0], HW_IF_POSITION, "double", "1.1");
StateInterface::SharedPtr joint_2_pos_ =
std::make_shared<StateInterface>(joint_names_[1], HW_IF_POSITION, &joint_states_[1]);
std::make_shared<StateInterface>(joint_names_[1], HW_IF_POSITION, "double", "2.2");
rclcpp::executors::SingleThreadedExecutor executor;
Comment on lines +50 to 56

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const std::vector<double> joint_states_ = {1.1, 2.2};
StateInterface::SharedPtr joint_1_pos_ =
std::make_shared<StateInterface>(joint_names_[0], HW_IF_POSITION, &joint_states_[0]);
std::make_shared<StateInterface>(joint_names_[0], HW_IF_POSITION, "double", "1.1");
StateInterface::SharedPtr joint_2_pos_ =
std::make_shared<StateInterface>(joint_names_[1], HW_IF_POSITION, &joint_states_[1]);
std::make_shared<StateInterface>(joint_names_[1], HW_IF_POSITION, "double", "2.2");
rclcpp::executors::SingleThreadedExecutor executor;
const std::vector<double> joint_states_ = {1.1, 2.2};
StateInterface::SharedPtr joint_1_pos_ = std::make_shared<StateInterface>(
joint_names_[0], HW_IF_POSITION, "double", std::to_string(joint_states_[0]));
StateInterface::SharedPtr joint_2_pos_ = std::make_shared<StateInterface>(
joint_names_[0], HW_IF_POSITION, "double", std::to_string(joint_states_[1]));

};

Expand Down
16 changes: 9 additions & 7 deletions diff_drive_controller/test/test_diff_drive_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,26 +232,26 @@ class TestDiffDriveController : public ::testing::Test
std::unique_ptr<TestableDiffDriveController> controller_;

std::vector<double> position_values_ = {0.1, 0.2};
std::vector<double> velocity_values_ = {0.01, 0.02};
const std::vector<double> velocity_values_ = {0.01, 0.02};

hardware_interface::StateInterface::SharedPtr left_wheel_pos_state_ =
std::make_shared<hardware_interface::StateInterface>(
left_wheel_names[0], HW_IF_POSITION, &position_values_[0]);
left_wheel_names[0], HW_IF_POSITION, "double", "0.1");
hardware_interface::StateInterface::SharedPtr right_wheel_pos_state_ =
std::make_shared<hardware_interface::StateInterface>(
right_wheel_names[0], HW_IF_POSITION, &position_values_[1]);
right_wheel_names[0], HW_IF_POSITION, "double", "0.2");
hardware_interface::StateInterface::SharedPtr left_wheel_vel_state_ =
std::make_shared<hardware_interface::StateInterface>(
left_wheel_names[0], HW_IF_VELOCITY, &velocity_values_[0]);
left_wheel_names[0], HW_IF_VELOCITY, "double", "0.01");
hardware_interface::StateInterface::SharedPtr right_wheel_vel_state_ =
std::make_shared<hardware_interface::StateInterface>(
right_wheel_names[0], HW_IF_VELOCITY, &velocity_values_[1]);
right_wheel_names[0], HW_IF_VELOCITY, "double", "0.02");
hardware_interface::CommandInterface::SharedPtr left_wheel_vel_cmd_ =
std::make_shared<hardware_interface::CommandInterface>(
left_wheel_names[0], HW_IF_VELOCITY, &velocity_values_[0]);
left_wheel_names[0], HW_IF_VELOCITY, "double", "0.01");
hardware_interface::CommandInterface::SharedPtr right_wheel_vel_cmd_ =
std::make_shared<hardware_interface::CommandInterface>(
right_wheel_names[0], HW_IF_VELOCITY, &velocity_values_[1]);
right_wheel_names[0], HW_IF_VELOCITY, "double", "0.02");

rclcpp::Node::SharedPtr pub_node;
rclcpp::Publisher<geometry_msgs::msg::TwistStamped>::SharedPtr velocity_publisher;
Expand Down Expand Up @@ -1359,7 +1359,9 @@ TEST_F(TestDiffDriveController, odometry_set_service)

// simulate the movement by updating the position feedback
position_values_[0] += 0.1; // left wheel moved
left_wheel_pos_state_->set_value(position_values_[0]);
position_values_[1] += 0.1; // right wheel moved
right_wheel_pos_state_->set_value(position_values_[1]);
controller_->update(test_time, period);
test_time += period;
EXPECT_GT(controller_->odometry_.getY(), -2.0);
Expand Down

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,19 @@ class ForceTorqueSensorBroadcasterTest : public ::testing::Test
protected:
const std::string sensor_name_ = "fts_sensor";
const std::string frame_id_ = "fts_sensor_frame";
std::array<double, 6> sensor_values_ = {{1.1, 2.2, 3.3, 4.4, 5.5, 6.6}};

const std::array<double, 6> sensor_values_ = {{1.1, 2.2, 3.3, 4.4, 5.5, 6.6}};
hardware_interface::StateInterface::SharedPtr fts_force_x_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "force.x", &sensor_values_[0]);
std::make_shared<hardware_interface::StateInterface>(sensor_name_, "force.x", "double", "1.1");
hardware_interface::StateInterface::SharedPtr fts_force_y_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "force.y", &sensor_values_[1]);
std::make_shared<hardware_interface::StateInterface>(sensor_name_, "force.y", "double", "2.2");
hardware_interface::StateInterface::SharedPtr fts_force_z_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "force.z", &sensor_values_[2]);
std::make_shared<hardware_interface::StateInterface>(sensor_name_, "force.z", "double", "3.3");
hardware_interface::StateInterface::SharedPtr fts_torque_x_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "torque.x", &sensor_values_[3]);
std::make_shared<hardware_interface::StateInterface>(sensor_name_, "torque.x", "double", "4.4");
hardware_interface::StateInterface::SharedPtr fts_torque_y_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "torque.y", &sensor_values_[4]);
std::make_shared<hardware_interface::StateInterface>(sensor_name_, "torque.y", "double", "5.5");
hardware_interface::StateInterface::SharedPtr fts_torque_z_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "torque.z", &sensor_values_[5]);
std::make_shared<hardware_interface::StateInterface>(sensor_name_, "torque.z", "double", "6.6");

std::unique_ptr<FriendForceTorqueSensorBroadcaster> fts_broadcaster_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,13 @@ class ForwardCommandControllerTest : public ::testing::Test

// dummy joint state values used for tests
const std::vector<std::string> joint_names_ = {"joint1", "joint2", "joint3"};
std::vector<double> joint_commands_ = {1.1, 2.1, 3.1};

CommandInterface::SharedPtr joint_1_pos_cmd_ =
std::make_shared<CommandInterface>(joint_names_[0], HW_IF_POSITION, &joint_commands_[0]);
std::make_shared<CommandInterface>(joint_names_[0], HW_IF_POSITION, "double", "1.1");
CommandInterface::SharedPtr joint_2_pos_cmd_ =
std::make_shared<CommandInterface>(joint_names_[1], HW_IF_POSITION, &joint_commands_[1]);
std::make_shared<CommandInterface>(joint_names_[1], HW_IF_POSITION, "double", "2.1");
CommandInterface::SharedPtr joint_3_pos_cmd_ =
std::make_shared<CommandInterface>(joint_names_[2], HW_IF_POSITION, &joint_commands_[2]);
std::make_shared<CommandInterface>(joint_names_[2], HW_IF_POSITION, "double", "3.1");
rclcpp::executors::SingleThreadedExecutor executor;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,12 @@ class MultiInterfaceForwardCommandControllerTest : public ::testing::Test
// dummy joint state value used for tests
const std::string joint_name_ = "joint1";

double pos_cmd_ = 1.1;
double vel_cmd_ = 2.1;
double eff_cmd_ = 3.1;

CommandInterface::SharedPtr joint_1_pos_cmd_ =
std::make_shared<CommandInterface>(joint_name_, HW_IF_POSITION, &pos_cmd_);
std::make_shared<CommandInterface>(joint_name_, HW_IF_POSITION, "double", "1.1");
CommandInterface::SharedPtr joint_1_vel_cmd_ =
std::make_shared<CommandInterface>(joint_name_, HW_IF_VELOCITY, &vel_cmd_);
std::make_shared<CommandInterface>(joint_name_, HW_IF_VELOCITY, "double", "2.1");
CommandInterface::SharedPtr joint_1_eff_cmd_ =
std::make_shared<CommandInterface>(joint_name_, HW_IF_EFFORT, &eff_cmd_);
std::make_shared<CommandInterface>(joint_name_, HW_IF_EFFORT, "double", "3.1");
rclcpp::executors::SingleThreadedExecutor executor;
};

Expand Down
16 changes: 8 additions & 8 deletions gpio_controllers/test/test_gpio_command_controller.cpp

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Original file line number Diff line number Diff line change
Expand Up @@ -218,22 +218,22 @@ class GpioCommandControllerTestSuite : public ::testing::Test
return params;
}
const std::vector<std::string> gpio_names{"gpio1", "gpio2"};
std::vector<double> gpio_commands{1.0, 0.0, 3.1};
std::vector<double> gpio_states{1.0, 0.0, 3.1};
const std::vector<double> gpio_commands{1.0, 0.0, 3.1};
const std::vector<double> gpio_states{1.0, 0.0, 3.1};

CommandInterface::SharedPtr gpio_1_1_dig_cmd =
std::make_shared<CommandInterface>(gpio_names.at(0), "dig.1", &gpio_commands.at(0));
std::make_shared<CommandInterface>(gpio_names.at(0), "dig.1", "double", "1.0");
CommandInterface::SharedPtr gpio_1_2_dig_cmd =
std::make_shared<CommandInterface>(gpio_names.at(0), "dig.2", &gpio_commands.at(1));
std::make_shared<CommandInterface>(gpio_names.at(0), "dig.2", "double", "0.0");
CommandInterface::SharedPtr gpio_2_ana_cmd =
std::make_shared<CommandInterface>(gpio_names.at(1), "ana.1", &gpio_commands.at(2));
std::make_shared<CommandInterface>(gpio_names.at(1), "ana.1", "double", "3.1");

StateInterface::SharedPtr gpio_1_1_dig_state =
std::make_shared<StateInterface>(gpio_names.at(0), "dig.1", &gpio_states.at(0));
std::make_shared<StateInterface>(gpio_names.at(0), "dig.1", "double", "1.0");
StateInterface::SharedPtr gpio_1_2_dig_state =
std::make_shared<StateInterface>(gpio_names.at(0), "dig.2", &gpio_states.at(1));
std::make_shared<StateInterface>(gpio_names.at(0), "dig.2", "double", "0.0");
StateInterface::SharedPtr gpio_2_ana_state =
std::make_shared<StateInterface>(gpio_names.at(1), "ana.1", &gpio_states.at(2));
std::make_shared<StateInterface>(gpio_names.at(1), "ana.1", "double", "3.1");
std::unique_ptr<rclcpp::Node> node;
};

Expand Down
22 changes: 9 additions & 13 deletions gps_sensor_broadcaster/test/test_gps_sensor_broadcaster.cpp

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Original file line number Diff line number Diff line change
Expand Up @@ -131,31 +131,27 @@ class GPSSensorBroadcasterTest : public ::testing::Test
const rclcpp::Parameter sensor_name_param_ = rclcpp::Parameter("sensor_name", "gps_sensor");
const std::string sensor_name_ = sensor_name_param_.get_value<std::string>();
const rclcpp::Parameter frame_id_ = rclcpp::Parameter("frame_id", "gps_sensor_frame");
std::array<double, 8> sensor_values_ = {{1.0, 1.0, 1.1, 2.2, 3.3, 0.5, 0.7, 0.9}};
const std::array<double, 8> sensor_values_ = {{1.0, 1.0, 1.1, 2.2, 3.3, 0.5, 0.7, 0.9}};
hardware_interface::StateInterface::SharedPtr gps_status_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "status", &sensor_values_[0]);
std::make_shared<hardware_interface::StateInterface>(sensor_name_, "status", "double", "1.0");
hardware_interface::StateInterface::SharedPtr gps_service_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "service", &sensor_values_[1]);
std::make_shared<hardware_interface::StateInterface>(sensor_name_, "service", "double", "1.0");
hardware_interface::StateInterface::SharedPtr gps_latitude_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "latitude", &sensor_values_[2]);
std::make_shared<hardware_interface::StateInterface>(sensor_name_, "latitude", "double", "1.1");
hardware_interface::StateInterface::SharedPtr gps_longitude_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "longitude", &sensor_values_[3]);
sensor_name_, "longitude", "double", "2.2");
hardware_interface::StateInterface::SharedPtr gps_altitude_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "altitude", &sensor_values_[4]);
std::make_shared<hardware_interface::StateInterface>(sensor_name_, "altitude", "double", "3.3");
hardware_interface::StateInterface::SharedPtr latitude_covariance_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "latitude_covariance", &sensor_values_[5]);
sensor_name_, "latitude_covariance", "double", "0.5");
hardware_interface::StateInterface::SharedPtr longitude_covariance_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "longitude_covariance", &sensor_values_[6]);
sensor_name_, "longitude_covariance", "double", "0.7");
hardware_interface::StateInterface::SharedPtr altitude_covariance_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "altitude_covariance", &sensor_values_[7]);
sensor_name_, "altitude_covariance", "double", "0.9");

std::unique_ptr<gps_sensor_broadcaster::GPSSensorBroadcaster> gps_broadcaster_;
};
Expand Down
22 changes: 11 additions & 11 deletions imu_sensor_broadcaster/test/test_imu_sensor_broadcaster.hpp

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Original file line number Diff line number Diff line change
Expand Up @@ -61,38 +61,38 @@ class IMUSensorBroadcasterTest : public ::testing::Test
protected:
const std::string sensor_name_ = "imu_sensor";
const std::string frame_id_ = "imu_sensor_frame";
std::array<double, 10> sensor_values_ = {
const std::array<double, 10> sensor_values_ = {
{0.1826, 0.3651, 0.5477, 0.7303, 5.5, 6.6, 7.7, 8.8, 9.9, 10.10}};
hardware_interface::StateInterface::SharedPtr imu_orientation_x_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "orientation.x", &sensor_values_[0]);
sensor_name_, "orientation.x", "double", "0.1826");
hardware_interface::StateInterface::SharedPtr imu_orientation_y_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "orientation.y", &sensor_values_[1]);
sensor_name_, "orientation.y", "double", "0.3651");
hardware_interface::StateInterface::SharedPtr imu_orientation_z_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "orientation.z", &sensor_values_[2]);
sensor_name_, "orientation.z", "double", "0.5477");
hardware_interface::StateInterface::SharedPtr imu_orientation_w_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "orientation.w", &sensor_values_[3]);
sensor_name_, "orientation.w", "double", "0.7303");
hardware_interface::StateInterface::SharedPtr imu_angular_velocity_x_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "angular_velocity.x", &sensor_values_[4]);
sensor_name_, "angular_velocity.x", "double", "5.5");
hardware_interface::StateInterface::SharedPtr imu_angular_velocity_y_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "angular_velocity.y", &sensor_values_[5]);
sensor_name_, "angular_velocity.y", "double", "6.6");
hardware_interface::StateInterface::SharedPtr imu_angular_velocity_z_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "angular_velocity.z", &sensor_values_[6]);
sensor_name_, "angular_velocity.z", "double", "7.7");
hardware_interface::StateInterface::SharedPtr imu_linear_acceleration_x_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "linear_acceleration.x", &sensor_values_[7]);
sensor_name_, "linear_acceleration.x", "double", "8.8");
hardware_interface::StateInterface::SharedPtr imu_linear_acceleration_y_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "linear_acceleration.y", &sensor_values_[8]);
sensor_name_, "linear_acceleration.y", "double", "9.9");
hardware_interface::StateInterface::SharedPtr imu_linear_acceleration_z_ =
std::make_shared<hardware_interface::StateInterface>(
sensor_name_, "linear_acceleration.z", &sensor_values_[9]);
sensor_name_, "linear_acceleration.z", "double", "10.1");

std::unique_ptr<FriendIMUSensorBroadcaster> imu_broadcaster_;

Expand Down
Loading
Loading