Skip to content
Merged
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
21 changes: 10 additions & 11 deletions control_toolbox/include/control_toolbox/pid_ros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,7 @@ class PidROS
prefix_is_for_params)
{
}
template <class NodeT>
explicit PidROS(std::shared_ptr<NodeT> node_ptr, const std::string & param_prefix)
: PidROS(
node_ptr->get_node_base_interface(), node_ptr->get_node_logging_interface(),
node_ptr->get_node_parameters_interface(), node_ptr->get_node_topics_interface(),
param_prefix, "", false)
{
}

/*!
* \brief Constructor of PidROS class.
*
Expand All @@ -93,7 +86,11 @@ class PidROS
*
* \param node Any ROS node
* \param param_prefix prefix to add to the pid parameters.
* \param topic_prefix prefix to add to the state publisher. If it starts with `~/`, topic will be local under the namespace of the node. If it starts with `/` or an alphanumeric character, topic will be in global namespace.
* \param topic_prefix prefix to add to the state publisher.
* If it starts with `~/`, topic will be local under the namespace of the node.
* If it starts with `/` or an alphanumeric character, topic will be in global namespace.
*
* state publisher is not activated if topic_prefix is empty,
*
*/
template <class NodeT>
Expand All @@ -103,7 +100,7 @@ class PidROS
: PidROS(
node_ptr->get_node_base_interface(), node_ptr->get_node_logging_interface(),
node_ptr->get_node_parameters_interface(), node_ptr->get_node_topics_interface(),
param_prefix, topic_prefix, true)
param_prefix, topic_prefix, !topic_prefix.empty())
{
}
/*!
Expand All @@ -114,7 +111,9 @@ class PidROS
*
* \param node Any ROS node
* \param param_prefix prefix to add to the pid parameters.
* \param topic_prefix prefix to add to the state publisher. If it starts with `~/`, topic will be local under the namespace of the node. If it starts with `/` or an alphanumeric character, topic will be in global namespace.
* \param topic_prefix prefix to add to the state publisher.
* If it starts with `~/`, topic will be local under the namespace of the node.
* If it starts with `/` or an alphanumeric character, topic will be in global namespace.
* \param activate_state_publisher If true, the publisher will be enabled after initialization.
*
*/
Expand Down