32 #ifndef MOTOMAN_DRIVER_INDUSTRIAL_ROBOT_CLIENT_JOINT_TRAJECTORY_STREAMER_H 33 #define MOTOMAN_DRIVER_INDUSTRIAL_ROBOT_CLIENT_JOINT_TRAJECTORY_STREAMER_H 35 #include <boost/thread/thread.hpp> 43 namespace joint_trajectory_streamer
94 virtual bool init(
SmplMsgConnection* connection,
const std::map<int, RobotGroup> &robot_groups,
95 const std::map<std::string, double> &velocity_limits = std::map<std::string, double>());
110 virtual bool init(
SmplMsgConnection* connection,
const std::vector<std::string> &joint_names,
111 const std::map<std::string, double> &velocity_limits = std::map<std::string, double>());
115 virtual void jointTrajectoryCB(
const trajectory_msgs::JointTrajectoryConstPtr &msg);
117 virtual void jointTrajectoryCB(
const motoman_msgs::DynamicJointTrajectoryConstPtr &msg);
119 virtual bool trajectory_to_msgs(
const trajectory_msgs::JointTrajectoryConstPtr& traj,
120 std::vector<SimpleMessage>* msgs);
122 virtual bool trajectory_to_msgs(
const motoman_msgs::DynamicJointTrajectoryConstPtr& traj,
123 std::vector<SimpleMessage>* msgs);
125 virtual void streamingThread();
127 bool send_to_robot(
const std::vector<SimpleMessage>& messages);
130 void trajectoryStop();
132 boost::thread* streaming_thread_;
135 std::vector<SimpleMessage> current_traj_;
136 TransferState state_;
138 int min_buffer_size_;
144 #endif // MOTOMAN_DRIVER_INDUSTRIAL_ROBOT_CLIENT_JOINT_TRAJECTORY_STREAMER_H
Message handler that relays joint trajectories to the robot controller.
virtual bool init(std::string default_ip="", int default_port=StandardSocketPorts::MOTION)
Message handler that streams joint trajectories to the robot controller.