NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
ros_arm_joint_sample.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  */
18 
19 #ifndef DDS_ROS_BRIDGE_ROS_ARM_JOINT_SAMPLE_H_
20 #define DDS_ROS_BRIDGE_ROS_ARM_JOINT_SAMPLE_H_
21 
22 #include <string>
23 
24 #include "dds_ros_bridge/ros_sub_rapid_pub.h"
25 #include "dds_ros_bridge/util.h"
26 
27 #include "ff_msgs/JointSample.h"
28 #include "ff_msgs/JointSampleStamped.h"
29 
30 #include "knDds/DdsTypedSupplier.h"
31 
32 #include "JointConfigSupport.h"
33 #include "JointSampleSupport.h"
34 
35 #include "rapidDds/RapidConstants.h"
36 #include "rapidUtil/RapidHelper.h"
37 
38 #include "ros/ros.h"
39 
40 namespace ff {
41 
43  public:
44  RosArmJointSampleToRapid(const std::string& subscribe_topic,
45  const std::string& pub_topic,
46  const ros::NodeHandle &nh,
47  unsigned int queue_size = 10);
48 
49  void Callback(ff_msgs::JointSampleStampedConstPtr const& sample);
50 
51  protected:
52  using ConfigSupplier = kn::DdsTypedSupplier<rapid::JointConfig>;
53  using ConfigSupplierPtr = std::unique_ptr<ConfigSupplier>;
54 
55  using SampleSupplier = kn::DdsTypedSupplier<rapid::JointSample>;
56  using SampleSupplierPtr = std::unique_ptr<SampleSupplier>;
57 
60 };
61 
62 } // end namespace ff
63 
64 #endif // DDS_ROS_BRIDGE_ROS_ARM_JOINT_SAMPLE_H_
ff::RosArmJointSampleToRapid
Definition: ros_arm_joint_sample.h:42
ff::RosArmJointSampleToRapid::Callback
void Callback(ff_msgs::JointSampleStampedConstPtr const &sample)
Definition: ros_arm_joint_sample.cc:81
ff::RosArmJointSampleToRapid::sample_supplier_
SampleSupplierPtr sample_supplier_
Definition: ros_arm_joint_sample.h:59
ff::RosSubRapidPub
Definition: ros_sub_rapid_pub.h:30
ff::RosArmJointSampleToRapid::SampleSupplier
kn::DdsTypedSupplier< rapid::JointSample > SampleSupplier
Definition: ros_arm_joint_sample.h:55
ff
Definition: generic_rapid_msg_ros_pub.h:36
ff::RosArmJointSampleToRapid::SampleSupplierPtr
std::unique_ptr< SampleSupplier > SampleSupplierPtr
Definition: ros_arm_joint_sample.h:56
ff::RosArmJointSampleToRapid::RosArmJointSampleToRapid
RosArmJointSampleToRapid(const std::string &subscribe_topic, const std::string &pub_topic, const ros::NodeHandle &nh, unsigned int queue_size=10)
Definition: ros_arm_joint_sample.cc:23
ff::RosArmJointSampleToRapid::config_supplier_
ConfigSupplierPtr config_supplier_
Definition: ros_arm_joint_sample.h:58
ff::RosArmJointSampleToRapid::ConfigSupplierPtr
std::unique_ptr< ConfigSupplier > ConfigSupplierPtr
Definition: ros_arm_joint_sample.h:53
ff::RosArmJointSampleToRapid::ConfigSupplier
kn::DdsTypedSupplier< rapid::JointConfig > ConfigSupplier
Definition: ros_arm_joint_sample.h:52