Skip to content

Commit

Permalink
proof of concept
Browse files Browse the repository at this point in the history
  • Loading branch information
Lennart Nachtigall committed May 26, 2023
1 parent 1239413 commit bd548c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn Cartes
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn CartesianComplianceController::on_activate(
const rclcpp_lifecycle::State & previous_state)
{

on_configure(previous_state);
// Base::on_activation(..) will get called twice,
// but that's fine.
using TYPE = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn;
Expand Down
3 changes: 2 additions & 1 deletion cartesian_controller_base/src/ForwardDynamicsSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ namespace cartesian_controller_base{
m_jnt_space_inertia.resize(m_number_joints);

// Set the initial value if provided at runtime, else use default value.
m_min = nh->declare_parameter<double>(m_params + "/link_mass", 0.1);
if(!nh->has_parameter(m_params + "/link_mass"))
m_min = nh->declare_parameter<double>(m_params + "/link_mass", 0.1);

RCLCPP_INFO(nh->get_logger(), "Forward dynamics solver initialized");
RCLCPP_INFO(nh->get_logger(), "Forward dynamics solver has control over %i joints", m_number_joints);
Expand Down
4 changes: 2 additions & 2 deletions cartesian_controller_base/src/cartesian_controller_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ controller_interface::return_type CartesianControllerBase::init(const std::strin
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn CartesianControllerBase::on_configure(
const rclcpp_lifecycle::State & previous_state)
{
if (m_configured)
/*if (m_configured)
{
return rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn::SUCCESS;
}
}*/

// Load user specified inverse kinematics solver
std::string ik_solver = get_node()->get_parameter("ik_solver").as_string();
Expand Down

0 comments on commit bd548c1

Please sign in to comment.