Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c626a08

Browse files
committedAug 8, 2024·
Cleanup
1 parent 3b7a4de commit c626a08

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed
 

‎moveit_core/online_signal_smoothing/include/moveit/online_signal_smoothing/ruckig_filter.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,15 @@ class RuckigFilterPlugin : public SmoothingBaseClass
8787
*/
8888
void printRuckigState();
8989

90-
rclcpp::Node::SharedPtr node_;
91-
void getDefaultJointVelAccelBounds();
90+
/**
91+
* A utility to get velocity/acceleration/jerk bounds from the robot model
92+
*/
93+
void getVelAccelJerkBounds();
9294

95+
rclcpp::Node::SharedPtr node_;
9396
online_signal_smoothing::Params params_;
94-
9597
size_t num_joints_;
9698
moveit::core::RobotModelConstPtr robot_model_;
97-
9899
bool have_initial_ruckig_output_;
99100
std::optional<ruckig::Ruckig<ruckig::DynamicDOFs>> ruckig_;
100101
std::optional<ruckig::InputParameter<ruckig::DynamicDOFs>> ruckig_input_;

‎moveit_core/online_signal_smoothing/src/ruckig_filter.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ bool RuckigFilterPlugin::initialize(rclcpp::Node::SharedPtr node, moveit::core::
6363
params_ = param_listener.get_params();
6464

6565
// Ruckig needs the joint vel/accel/jerk bounds.
66-
getDefaultJointVelAccelBounds();
66+
getVelAccelJerkBounds();
6767
ruckig::InputParameter<ruckig::DynamicDOFs> ruckig_input(num_joints_);
6868
ruckig_input.max_velocity = joint_velocity_bounds_;
6969
ruckig_input.max_acceleration = joint_acceleration_bounds_;
@@ -136,7 +136,7 @@ bool RuckigFilterPlugin::reset(const Eigen::VectorXd& positions, const Eigen::Ve
136136
return true;
137137
}
138138

139-
void RuckigFilterPlugin::getDefaultJointVelAccelBounds()
139+
void RuckigFilterPlugin::getVelAccelJerkBounds()
140140
{
141141
auto joint_model_group = robot_model_->getJointModelGroup(params_.planning_group_name);
142142
for (const auto& joint : joint_model_group->getActiveJointModels())
@@ -150,7 +150,7 @@ void RuckigFilterPlugin::getDefaultJointVelAccelBounds()
150150
}
151151
else
152152
{
153-
RCLCPP_ERROR(getLogger(), "No joint vel limit defined. Exiting for safety.");
153+
RCLCPP_ERROR(getLogger(), "No joint velocity limit defined. Exiting for safety.");
154154
std::exit(EXIT_FAILURE);
155155
}
156156

@@ -161,8 +161,8 @@ void RuckigFilterPlugin::getDefaultJointVelAccelBounds()
161161
}
162162
else
163163
{
164-
RCLCPP_ERROR(getLogger(), "WARNING: No joint accel limit defined. Very large accelerations will be "
165-
"possible.");
164+
RCLCPP_WARN(getLogger(), "No joint acceleration limit defined. Very large accelerations will be "
165+
"possible.");
166166
joint_acceleration_bounds_.push_back(DBL_MAX);
167167
}
168168

@@ -184,9 +184,9 @@ void RuckigFilterPlugin::getDefaultJointVelAccelBounds()
184184

185185
void RuckigFilterPlugin::printRuckigState()
186186
{
187-
RCLCPP_ERROR_STREAM(getLogger(), ruckig_->delta_time << "\nRuckig input:\n"
188-
<< ruckig_input_->to_string() << "\nRuckig output:\n"
189-
<< ruckig_output_->to_string());
187+
RCLCPP_INFO_STREAM(getLogger(), ruckig_->delta_time << "\nRuckig input:\n"
188+
<< ruckig_input_->to_string() << "\nRuckig output:\n"
189+
<< ruckig_output_->to_string());
190190
}
191191
} // namespace online_signal_smoothing
192192

‎moveit_ros/moveit_servo/src/servo_node.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ void ServoNode::servoLoop()
383383
{
384384
// if no new command was created, use current robot state
385385
updateSlidingWindow(current_state, joint_cmd_rolling_window_, servo_params_.max_expected_latency, cur_time);
386-
// servo_->resetSmoothing(current_state);
387386
}
388387

389388
status_msg.code = static_cast<int8_t>(servo_->getStatus());

0 commit comments

Comments
 (0)
Please sign in to comment.