Go to the documentation of this file.
49 #include <pr2_msgs/LaserScannerSignal.h>
50 #include <pr2_msgs/PeriodicCmd.h>
51 #include <pr2_mechanism_controllers/TrackLinkCmd.h>
52 #include <pr2_msgs/LaserTrajCmd.h>
55 #include <pr2_mechanism_controllers/SetProfile.h>
56 #include <pr2_msgs/SetPeriodicCmd.h>
57 #include <pr2_msgs/SetLaserTrajCmd.h>
59 #include <boost/thread/mutex.hpp>
65 class LaserScannerTrajController
77 bool setTrajCmd(
const pr2_msgs::LaserTrajCmd& traj_cmd) ;
81 bool setTrajectory(
const std::vector<trajectory::Trajectory::TPoint>& traj_points,
82 double max_rate,
double max_acc, std::string interp ) ;
131 void setTrajCmd(
const pr2_msgs::LaserTrajCmdConstPtr &traj_cmd);
134 pr2_msgs::SetPeriodicCmd::Response &res);
135 bool setTrajSrv(pr2_msgs::SetLaserTrajCmd::Request &req,
136 pr2_msgs::SetLaserTrajCmd::Response &res);
bool need_to_send_msg_
Tracks whether we still need to send out the m_scanner_signal_ message.
trajectory::Trajectory traj_
ros::Subscriber sub_set_periodic_cmd_
int prev_profile_segment_
The segment in the current profile when update() was last called.
bool setTrajSrv(pr2_msgs::SetLaserTrajCmd::Request &req, pr2_msgs::SetLaserTrajCmd::Response &res)
double getProfileDuration()
Returns the length (in seconds) of our current profile.
LaserScannerTrajControllerNode()
pr2_mechanism_controllers::TrackLinkCmd track_link_cmd_
filters::FilterChain< double > d_error_filter_chain_
realtime_tools::RealtimePublisher< pr2_msgs::LaserScannerSignal > * publisher_
Publishes the m_scanner_signal msg from the update() realtime loop.
pr2_mechanism_model::JointState * joint_state_
control_toolbox::Pid pid_controller_
ros::Time traj_start_time_
bool setPeriodicSrv(pr2_msgs::SetPeriodicCmd::Request &req, pr2_msgs::SetPeriodicCmd::Response &res)
bool init(pr2_mechanism_model::RobotState *robot, ros::NodeHandle &n)
~LaserScannerTrajControllerNode()
pr2_mechanism_model::RobotState * robot_
bool setTrajCmd(const pr2_msgs::LaserTrajCmd &traj_cmd)
int getCurProfileSegment()
Returns the current trajectory segment we're executing in our current profile.
~LaserScannerTrajController()
pr2_msgs::LaserScannerSignal m_scanner_signal_
Stores the message that we want to send at the end of each sweep, and halfway through each sweep.
ros::Subscriber sub_set_traj_cmd_
double getCurProfileTime()
Returns what time we're currently at in the profile being executed.
bool setPeriodicCmd(const pr2_msgs::PeriodicCmd &cmd)
LaserScannerTrajController c_
LaserScannerTrajController()
ros::ServiceServer serve_set_periodic_cmd_
std::string service_prefix_
pr2_mechanism_model::RobotState * robot_
void setPeriodicCmd(const pr2_msgs::PeriodicCmdConstPtr &cmd)
bool setTrajectory(const std::vector< trajectory::Trajectory::TPoint > &traj_points, double max_rate, double max_acc, std::string interp)
ros::ServiceServer serve_set_Traj_cmd_
bool init(pr2_mechanism_model::RobotState *robot, ros::NodeHandle &n)
void setTrajCmd(const pr2_msgs::LaserTrajCmdConstPtr &traj_cmd)