New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate diff drive controller to resourcemanager #128
Migrate diff drive controller to resourcemanager #128
Conversation
6755802
to
1c8259d
Compare
1c8259d
to
d46c90e
Compare
7ba0bea
to
19b1346
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some commented lines in the tests....
right_wheel_names_(std::move(right_wheel_names)), | ||
write_op_names_(std::move(write_op_names)) | ||
{} | ||
|
||
controller_interface::return_type | ||
DiffDriveController::init( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better?
DiffDriveController::init( | |
DiffDriveController::init(const std::string & controller_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
controller_interface::return_type | ||
DiffDriveController::init( | ||
std::weak_ptr<hardware_interface::RobotHardware> robot_hardware, | ||
const std::string & controller_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if above...
const std::string & controller_name) |
|
||
is_halted = false; | ||
subscriber_is_active_ = true; | ||
|
||
RCLCPP_INFO( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RCLCPP_INFO( | |
RCLCPP_DEBUG( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch, changed
setup_controller(*diff_drive_controller, executor); | ||
executor.add_node(controller_->get_node()->get_node_base_interface()); | ||
auto state = controller_->configure(); | ||
// ASSERT_EQ(State::PRIMARY_STATE_INACTIVE, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ASSERT_EQ(State::PRIMARY_STATE_INACTIVE, state.id()); | |
ASSERT_EQ(State::PRIMARY_STATE_INACTIVE, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, restored now
|
||
state = controller_->activate(); | ||
// ASSERT_EQ(State::PRIMARY_STATE_ACTIVE, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ASSERT_EQ(State::PRIMARY_STATE_ACTIVE, state.id()); | |
ASSERT_EQ(State::PRIMARY_STATE_ACTIVE, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, restored now
state = diff_drive_lifecycle_node->cleanup(); | ||
ASSERT_EQ(State::PRIMARY_STATE_UNCONFIGURED, state.id()); | ||
state = controller_->cleanup(); | ||
// ASSERT_EQ(State::PRIMARY_STATE_UNCONFIGURED, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ASSERT_EQ(State::PRIMARY_STATE_UNCONFIGURED, state.id()); | |
ASSERT_EQ(State::PRIMARY_STATE_UNCONFIGURED, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, restored now
state = diff_drive_lifecycle_node->activate(); | ||
ASSERT_EQ(State::PRIMARY_STATE_ACTIVE, state.id()); | ||
state = controller_->activate(); | ||
// ASSERT_EQ(State::PRIMARY_STATE_ACTIVE, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ASSERT_EQ(State::PRIMARY_STATE_ACTIVE, state.id()); | |
ASSERT_EQ(State::PRIMARY_STATE_ACTIVE, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, restored now
diff_drive_controller->update(); | ||
test_robot->write(); | ||
state = controller_->deactivate(); | ||
// ASSERT_EQ(state.id(), State::PRIMARY_STATE_INACTIVE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ASSERT_EQ(state.id(), State::PRIMARY_STATE_INACTIVE); | |
ASSERT_EQ(state.id(), State::PRIMARY_STATE_INACTIVE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, restored now
state = diff_drive_lifecycle_node->configure(); | ||
ASSERT_EQ(State::PRIMARY_STATE_INACTIVE, state.id()); | ||
state = controller_->cleanup(); | ||
// ASSERT_EQ(State::PRIMARY_STATE_UNCONFIGURED, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ASSERT_EQ(State::PRIMARY_STATE_UNCONFIGURED, state.id()); | |
ASSERT_EQ(State::PRIMARY_STATE_UNCONFIGURED, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, restored now
EXPECT_EQ(0.0, right_wheel_vel_cmd_.get_value()); | ||
|
||
state = controller_->configure(); | ||
// ASSERT_EQ(State::PRIMARY_STATE_INACTIVE, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ASSERT_EQ(State::PRIMARY_STATE_INACTIVE, state.id()); | |
ASSERT_EQ(State::PRIMARY_STATE_INACTIVE, state.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, restored now
b003332
to
4c0fd8f
Compare
Thanks @destogl , I think I've addressed all your points |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good.
No description provided.