Skip to content
Merged
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
13 changes: 6 additions & 7 deletions include/sas_robot_kinematics/sas_robot_kinematics_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <sas_core/sas_object.hpp>
#include <sas_msgs/msg/float64.hpp>

using namespace rclcpp;
using namespace DQ_robotics;

namespace sas
Expand All @@ -49,18 +48,18 @@ namespace sas
class RobotKinematicsClient: private sas::Object
{
private:
std::shared_ptr<Node> node_;
std::shared_ptr<rclcpp::Node> node_;

std::atomic_bool enabled_;
const std::string topic_prefix_;

Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr subscriber_pose_;
rclcpp::Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr subscriber_pose_;
DQ pose_;
Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr subscriber_reference_frame_;
rclcpp::Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr subscriber_reference_frame_;
DQ reference_frame_;

Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr publisher_desired_pose_;
Publisher<sas_msgs::msg::Float64>::SharedPtr publisher_desired_interpolator_speed_;
rclcpp::Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr publisher_desired_pose_;
rclcpp::Publisher<sas_msgs::msg::Float64>::SharedPtr publisher_desired_interpolator_speed_;

void _callback_pose(const geometry_msgs::msg::PoseStamped& msg);
void _callback_reference_frame(const geometry_msgs::msg::PoseStamped& msg);
Expand All @@ -79,7 +78,7 @@ class RobotKinematicsClient: private sas::Object
* @param topic_prefix Topic name prefix used for subscriptions and
* publications.
*/
RobotKinematicsClient(const std::shared_ptr<Node> &node, const std::string& topic_prefix);
RobotKinematicsClient(const std::shared_ptr<rclcpp::Node> &node, const std::string& topic_prefix);

/**
* @brief Check whether the client is enabled (subscribers/publishers active).
Expand Down
13 changes: 6 additions & 7 deletions include/sas_robot_kinematics/sas_robot_kinematics_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <sas_core/sas_object.hpp>
#include <sas_msgs/msg/float64.hpp>

using namespace rclcpp;
using namespace DQ_robotics;

namespace sas
Expand All @@ -48,17 +47,17 @@ namespace sas
class RobotKinematicsServer: private sas::Object
{
protected:
std::shared_ptr<Node> node_;
std::shared_ptr<rclcpp::Node> node_;

std::atomic_bool enabled_;
const std::string topic_prefix_;

Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr publisher_pose_;
Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr publisher_reference_frame_;
rclcpp::Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr publisher_pose_;
rclcpp::Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr publisher_reference_frame_;

Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr subscriber_desired_pose_;
rclcpp::Subscription<geometry_msgs::msg::PoseStamped>::SharedPtr subscriber_desired_pose_;
DQ desired_pose_;
Subscription<sas_msgs::msg::Float64>::SharedPtr subscriber_desired_interpolator_speed_;
rclcpp::Subscription<sas_msgs::msg::Float64>::SharedPtr subscriber_desired_interpolator_speed_;
double desired_interpolator_speed_;

void _callback_desired_pose(const geometry_msgs::msg::PoseStamped& msg);
Expand All @@ -79,7 +78,7 @@ class RobotKinematicsServer: private sas::Object
* @param topic_prefix Topic name prefix used for subscriptions and
* publications.
*/
RobotKinematicsServer(const std::shared_ptr<Node>& node, const std::string& topic_prefix);
RobotKinematicsServer(const std::shared_ptr<rclcpp::Node>& node, const std::string& topic_prefix);

/**
* @brief Get the most recently received desired pose.
Expand Down
2 changes: 1 addition & 1 deletion src/sas_robot_kinematics_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void RobotKinematicsClient::_callback_reference_frame(const geometry_msgs::msg::
//}
//#endif

RobotKinematicsClient::RobotKinematicsClient(const std::shared_ptr<Node> &node, const std::string &topic_prefix):
RobotKinematicsClient::RobotKinematicsClient(const std::shared_ptr<rclcpp::Node> &node, const std::string &topic_prefix):
sas::Object("RobotKinematicsClient"),
node_(node),
enabled_(false),
Expand Down
2 changes: 1 addition & 1 deletion src/sas_robot_kinematics_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void RobotKinematicsServer::_callback_desired_interpolator_speed(const sas_msgs:
//}
//#endif

RobotKinematicsServer::RobotKinematicsServer(const std::shared_ptr<Node> &node, const std::string &topic_prefix):
RobotKinematicsServer::RobotKinematicsServer(const std::shared_ptr<rclcpp::Node> &node, const std::string &topic_prefix):
sas::Object("RobotKinematicsServer"),
node_(node),
enabled_(false),
Expand Down
Loading