NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
ros_pmc_cmd_state.h
Go to the documentation of this file.
1 // Copyright 2017 Intelligent Robotics Geoup, NASA ARC
2 
3 #ifndef DDS_ROS_BRIDGE_ROS_PMC_CMD_STATE_H_
4 #define DDS_ROS_BRIDGE_ROS_PMC_CMD_STATE_H_
5 
6 #include <string>
7 
8 #include "dds_ros_bridge/ros_sub_rapid_pub.h"
9 #include "dds_ros_bridge/util.h"
10 
11 #include "ff_hw_msgs/PmcCommand.h"
12 
13 #include "knDds/DdsTypedSupplier.h"
14 
15 #include "rapidDds/RapidConstants.h"
16 
17 #include "rapidIo/RapidIoParameters.h"
18 
19 #include "rapidUtil/RapidHelper.h"
20 
21 #include "dds_msgs/AstrobeeConstants.h"
22 #include "dds_msgs/PmcCmdStateSupport.h"
23 
24 namespace ff {
25 
27  public:
28  RosPmcCmdStateToRapid(const std::string& subscribe_topic,
29  const std::string& pub_topic,
30  const ros::NodeHandle& nh,
31  const unsigned int queue_size = 10);
32 
33  void CopyPmcGoal(const ff_hw_msgs::PmcGoal& ros_goal, rapid::ext::astrobee::PmcGoal& dds_goal);
34  void MsgCallback(const ff_hw_msgs::PmcCommandConstPtr& msg);
35  void PubPmcCmdState(const ros::TimerEvent& event);
36  void SetPmcPublishRate(float rate);
37 
38  private:
39  ff_hw_msgs::PmcCommandConstPtr pmc_msg_;
40 
41  using StateSupplier =
42  kn::DdsTypedSupplier<rapid::ext::astrobee::PmcCmdState>;
43  using StateSupplierPtr = std::unique_ptr<StateSupplier>;
44 
45  StateSupplierPtr state_supplier_;
46 
47  ros::Timer pmc_timer_;
48 };
49 
50 } // end namespace ff
51 
52 #endif // DDS_ROS_BRIDGE_ROS_PMC_CMD_STATE_H_
ff::RosPmcCmdStateToRapid::MsgCallback
void MsgCallback(const ff_hw_msgs::PmcCommandConstPtr &msg)
Definition: ros_pmc_cmd_state.cc:66
ff::RosPmcCmdStateToRapid::PubPmcCmdState
void PubPmcCmdState(const ros::TimerEvent &event)
Definition: ros_pmc_cmd_state.cc:71
ff::RosPmcCmdStateToRapid::CopyPmcGoal
void CopyPmcGoal(const ff_hw_msgs::PmcGoal &ros_goal, rapid::ext::astrobee::PmcGoal &dds_goal)
Definition: ros_pmc_cmd_state.cc:56
ff::RosPmcCmdStateToRapid::SetPmcPublishRate
void SetPmcPublishRate(float rate)
Definition: ros_pmc_cmd_state.cc:92
ff::RosSubRapidPub
Definition: ros_sub_rapid_pub.h:30
ff::RosPmcCmdStateToRapid::RosPmcCmdStateToRapid
RosPmcCmdStateToRapid(const std::string &subscribe_topic, const std::string &pub_topic, const ros::NodeHandle &nh, const unsigned int queue_size=10)
Definition: ros_pmc_cmd_state.cc:24
ff
Definition: generic_rapid_msg_ros_pub.h:36
ff::RosPmcCmdStateToRapid
Definition: ros_pmc_cmd_state.h:26