NASA Astrobee Robot Software  Astrobee Version:
Flight software for the Astrobee robots operating inside the International Space Station.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
executive.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 EXECUTIVE_EXECUTIVE_H_
20 #define EXECUTIVE_EXECUTIVE_H_
21 
26 #include <ff_hw_msgs/ClearTerminate.h>
27 #include <ff_hw_msgs/ConfigurePayloadPower.h>
28 #include <ff_hw_msgs/ConfigureSystemLeds.h>
29 #include <ff_hw_msgs/SetEnabled.h>
30 #include <ff_hw_msgs/SetFlashlight.h>
31 #include <ff_msgs/AckCompletedStatus.h>
32 #include <ff_msgs/AckStamped.h>
33 #include <ff_msgs/AckStatus.h>
34 #include <ff_msgs/AgentStateStamped.h>
35 #include <ff_msgs/ArmAction.h>
36 #include <ff_msgs/CameraStatesStamped.h>
37 #include <ff_msgs/CommandConstants.h>
38 #include <ff_msgs/CommandStamped.h>
39 #include <ff_msgs/CompressedFile.h>
40 #include <ff_msgs/CompressedFileAck.h>
41 #include <ff_msgs/ConfigureCamera.h>
42 #include <ff_msgs/ControlCommand.h>
43 #include <ff_msgs/DockAction.h>
44 #include <ff_msgs/EnableCamera.h>
45 #include <ff_msgs/EnableRecording.h>
46 #include <ff_msgs/FaultState.h>
47 #include <ff_msgs/GuestScienceApk.h>
48 #include <ff_msgs/GuestScienceConfig.h>
49 #include <ff_msgs/GuestScienceState.h>
50 #include <ff_msgs/LocalizationAction.h>
51 #include <ff_msgs/MotionAction.h>
52 #include <ff_msgs/PerchAction.h>
53 #include <ff_msgs/PlanStatusStamped.h>
54 #include <ff_msgs/ResetMap.h>
55 #include <ff_msgs/ResponseOnly.h>
56 #include <ff_msgs/SetDataToDisk.h>
57 #include <ff_msgs/SetExposure.h>
58 #include <ff_msgs/SetFloat.h>
59 #include <ff_msgs/SetInertia.h>
60 #include <ff_msgs/SetRate.h>
61 #include <ff_msgs/SetZones.h>
62 #include <ff_msgs/UnloadLoadNodelet.h>
63 #include <ff_msgs/Zone.h>
64 #include <ff_common/ff_names.h>
65 #include <ff_util/config_client.h>
66 #include <ff_util/ff_action.h>
67 #include <ff_util/ff_flight.h>
68 #include <ff_util/ff_nodelet.h>
69 #include <ff_util/ff_service.h>
70 
71 #include <pluginlib/class_list_macros.h>
72 #include <ros/ros.h>
73 #include <ros/console.h>
74 #include <ros/package.h>
75 #include <std_srvs/Empty.h>
76 
77 #include <json/json.h>
78 #include <json/value.h>
79 
80 #include <map>
81 #include <string>
82 #include <utility>
83 #include <vector>
84 
85 using ff_msgs::CommandConstants;
86 
87 namespace executive {
88 class OpState;
89 
101  public:
102  Executive();
103  ~Executive();
104 
105  // Message and timeout callbacks
106  void CameraStatesCallback(ff_msgs::CameraStatesStampedConstPtr const& state);
107  void CmdCallback(ff_msgs::CommandStampedPtr const& cmd);
108  void DataToDiskCallback(ff_msgs::CompressedFileConstPtr const& data);
109  void DockStateCallback(ff_msgs::DockStateConstPtr const& state);
110  void FaultStateCallback(ff_msgs::FaultStateConstPtr const& state);
111  void GuestScienceAckCallback(ff_msgs::AckStampedConstPtr const& ack);
112  void GuestScienceConfigCallback(ff_msgs::GuestScienceConfigConstPtr const&
113  config);
114  void GuestScienceStateCallback(ff_msgs::GuestScienceStateConstPtr const&
115  state);
116  void GuestScienceCustomCmdTimeoutCallback(ros::TimerEvent const& te);
117  void GuestScienceStartStopRestartCmdTimeoutCallback(ros::TimerEvent const&
118  te);
119  void InertiaCallback(geometry_msgs::InertiaStampedConstPtr const& inertia);
120  void LedConnectedCallback();
121  void MotionStateCallback(ff_msgs::MotionStatePtr const& state);
122  void PerchStateCallback(ff_msgs::PerchStateConstPtr const& state);
123  void PlanCallback(ff_msgs::CompressedFileConstPtr const& plan);
124  void SysMonitorHeartbeatCallback(ff_msgs::HeartbeatConstPtr const& heartbeat);
125  void SysMonitorTimeoutCallback(ros::TimerEvent const& te);
126  void WaitCallback(ros::TimerEvent const& te);
127  void ZonesCallback(ff_msgs::CompressedFileConstPtr const& zones);
128 
129  // Action based commands
130  bool AreActionsRunning();
131  void CancelAction(Action action, std::string cmd);
132  bool FillArmGoal(ff_msgs::CommandStampedPtr const& cmd);
133  bool FillDockGoal(ff_msgs::CommandStampedPtr const& cmd, bool return_to_dock);
134  bool FillMotionGoal(Action action,
135  ff_msgs::CommandStampedPtr const& cmd = nullptr);
136  bool IsActionRunning(Action action);
137  bool StartAction(Action action, std::string const& cmd_id);
138  bool RemoveAction(Action action);
139 
140  // Action callbacks
142  ff_msgs::ArmResultConstPtr const& result);
143 
145  ff_msgs::DockResultConstPtr const& result);
146 
149  ff_msgs::LocalizationResultConstPtr const& result);
150 
151  void MotionFeedbackCallback(ff_msgs::MotionFeedbackConstPtr const& feedback);
153  ff_msgs::MotionResultConstPtr const& result);
154 
156  ff_msgs::PerchResultConstPtr const& result);
157 
158  // Publishers
159  void PublishCmdAck(std::string const& cmd_id,
160  uint8_t completed_status = ff_msgs::AckCompletedStatus::OK,
161  std::string const& message = "",
162  uint8_t status = ff_msgs::AckStatus::COMPLETED);
163  void PublishPlan();
164  void PublishPlanStatus(uint8_t status);
165 
166  // Getters
167  ff_msgs::MobilityState GetMobilityState();
168  uint8_t GetPlanExecState();
169  std::string GetRunPlanCmdId();
170 
171  // Setters
172  void SetMobilityState();
173  void SetMobilityState(uint8_t state, uint32_t sub_state = 0);
174  void SetOpState(OpState* state);
175  void SetPlanExecState(uint8_t state);
176  void SetRunPlanCmdId(std::string cmd_id);
177 
178  // Helper functions
179  void AckMobilityStateIssue(ff_msgs::CommandStampedPtr const& cmd,
180  std::string const& current_mobility_state,
181  std::string const& accepted_mobility_state = "");
182  bool ArmControl(ff_msgs::CommandStampedPtr const& cmd);
183  bool CheckServiceExists(ros::ServiceClient& serviceIn,
184  std::string const& serviceName,
185  std::string const& cmd_in);
186  bool CheckStoppedOrDrifting(std::string const& cmd_id,
187  std::string const& cmd_name);
188  bool ConfigureLed(ff_hw_msgs::ConfigureSystemLeds& led_srv);
189  bool ConfigureMobility(bool move_to_start, std::string& err_msg);
190  bool FailCommandIfMoving(ff_msgs::CommandStampedPtr const& cmd);
191  bool LoadUnloadNodelet(ff_msgs::CommandStampedPtr const& cmd);
192  ros::Time MsToSec(std::string timestamp);
193  bool PowerItem(ff_msgs::CommandStampedPtr const& cmd, bool on);
194  bool ProcessGuestScienceCommand(ff_msgs::CommandStampedPtr const& cmd);
195  bool ResetEkf(std::string const& cmd_id);
196  void StartWaitTimer(float duration);
197  void StopWaitTimer();
198 
199  // Plan related functions
200  bool AckCurrentPlanItem();
202  ff_msgs::CommandStampedPtr GetPlanCommand();
203  bool GetSetPlanInertia(std::string const& cmd_id);
205 
206  // Commands
207  bool ArmPanAndTilt(ff_msgs::CommandStampedPtr const& cmd);
208  bool AutoReturn(ff_msgs::CommandStampedPtr const& cmd);
209  bool CustomGuestScience(ff_msgs::CommandStampedPtr const& cmd);
210  bool DeployArm(ff_msgs::CommandStampedPtr const& cmd);
211  bool Dock(ff_msgs::CommandStampedPtr const& cmd);
212  bool EnableAstrobeeIntercomms(ff_msgs::CommandStampedPtr const& cmd);
213  bool Fault(ff_msgs::CommandStampedPtr const& cmd);
214  bool GripperControl(ff_msgs::CommandStampedPtr const& cmd);
215  bool IdlePropulsion(ff_msgs::CommandStampedPtr const& cmd);
216  bool InitializeBias(ff_msgs::CommandStampedPtr const& cmd);
217  bool LoadNodelet(ff_msgs::CommandStampedPtr const& cmd);
218  bool NoOp(ff_msgs::CommandStampedPtr const& cmd);
219  bool PausePlan(ff_msgs::CommandStampedPtr const& cmd);
220  bool Perch(ff_msgs::CommandStampedPtr const& cmd);
221  bool PowerItemOff(ff_msgs::CommandStampedPtr const& cmd);
222  bool PowerItemOn(ff_msgs::CommandStampedPtr const& cmd);
223  bool Prepare(ff_msgs::CommandStampedPtr const& cmd);
224  bool ReacquirePosition(ff_msgs::CommandStampedPtr const& cmd);
225  bool ResetEkf(ff_msgs::CommandStampedPtr const& cmd);
226  bool RestartGuestScience(ff_msgs::CommandStampedPtr const& cmd);
227  bool RunPlan(ff_msgs::CommandStampedPtr const& cmd);
228  bool SetCamera(ff_msgs::CommandStampedPtr const& cmd);
229  bool SetCameraRecording(ff_msgs::CommandStampedPtr const& cmd);
230  bool SetCameraStreaming(ff_msgs::CommandStampedPtr const& cmd);
231  bool SetCheckObstacles(ff_msgs::CommandStampedPtr const& cmd);
232  bool SetCheckZones(ff_msgs::CommandStampedPtr const& cmd);
233  bool SetDataToDisk(ff_msgs::CommandStampedPtr const& cmd);
234  bool SetEnableAutoReturn(ff_msgs::CommandStampedPtr const& cmd);
235  bool SetEnableImmediate(ff_msgs::CommandStampedPtr const& cmd);
236  bool SetEnableReplan(ff_msgs::CommandStampedPtr const& cmd);
237  bool SetExposure(ff_msgs::CommandStampedPtr const& cmd);
238  bool SetFlashlightBrightness(ff_msgs::CommandStampedPtr const& cmd);
239  bool SetHolonomicMode(ff_msgs::CommandStampedPtr const& cmd);
240  bool SetInertia(ff_msgs::CommandStampedPtr const& cmd);
241  bool SetMap(ff_msgs::CommandStampedPtr const& cmd);
242  bool SetOperatingLimits(ff_msgs::CommandStampedPtr const& cmd);
243  bool SetPlan(ff_msgs::CommandStampedPtr const& cmd);
244  bool SetPlanner(ff_msgs::CommandStampedPtr const& cmd);
245  bool SetTelemetryRate(ff_msgs::CommandStampedPtr const& cmd);
246  bool SetZones(ff_msgs::CommandStampedPtr const& cmd);
247  bool SkipPlanStep(ff_msgs::CommandStampedPtr const& cmd);
248  bool StartGuestScience(ff_msgs::CommandStampedPtr const& cmd);
249  bool StartRecording(ff_msgs::CommandStampedPtr const& cmd);
250  bool StopAllMotion(ff_msgs::CommandStampedPtr const& cmd);
251  bool StopArm(ff_msgs::CommandStampedPtr const& cmd);
252  bool StopRecording(ff_msgs::CommandStampedPtr const& cmd);
253  bool StopGuestScience(ff_msgs::CommandStampedPtr const& cmd);
254  bool StowArm(ff_msgs::CommandStampedPtr const& cmd);
255  bool SwitchLocalization(ff_msgs::CommandStampedPtr const& cmd);
256  bool Undock(ff_msgs::CommandStampedPtr const& cmd);
257  bool UnloadNodelet(ff_msgs::CommandStampedPtr const& cmd);
258  bool Unperch(ff_msgs::CommandStampedPtr const& cmd);
259  bool Unterminate(ff_msgs::CommandStampedPtr const& cmd);
260  bool Wait(ff_msgs::CommandStampedPtr const& cmd);
261 
262  protected:
263  virtual void Initialize(ros::NodeHandle *nh);
264  bool ReadParams();
265  bool ReadMapperParams();
267  ff_msgs::CommandStampedPtr cmd);
268  void PublishAgentState();
270 
276 
278 
279  ff_msgs::AgentStateStamped agent_state_;
280 
281  ff_msgs::AckStamped ack_;
282 
283  ff_msgs::CommandStampedPtr sys_monitor_init_fault_response_;
284  ff_msgs::CommandStampedPtr sys_monitor_heartbeat_fault_response_;
285 
286  ff_msgs::CompressedFileAck cf_ack_;
287  ff_msgs::CompressedFileConstPtr plan_, zones_, data_to_disk_;
288 
289  ff_msgs::CameraStatesStamped camera_states_;
290  ff_msgs::DockStateConstPtr dock_state_;
291  ff_msgs::FaultStateConstPtr fault_state_;
292  ff_msgs::GuestScienceConfigConstPtr guest_science_config_;
293  ff_msgs::MotionStatePtr motion_state_;
294  ff_msgs::PerchStateConstPtr perch_state_;
295 
296  ff_msgs::ArmGoal arm_goal_;
297  ff_msgs::DockGoal dock_goal_;
298  ff_msgs::LocalizationGoal localization_goal_;
299  ff_msgs::MotionGoal motion_goal_;
300  ff_msgs::PerchGoal perch_goal_;
301 
303 
304  geometry_msgs::InertiaStampedConstPtr current_inertia_;
305 
306  ros::NodeHandle nh_;
307 
309  ros::Publisher cf_ack_pub_, gs_cmd_pub_;
310 
311  ros::ServiceClient zones_client_, laser_enable_client_;
319  ros::ServiceClient set_dock_cam_exposure_client_;
320  ros::ServiceClient set_nav_cam_exposure_client_;
325  ros::ServiceClient unload_load_nodelet_client_;
326  ros::ServiceClient set_collision_distance_client_;
327 
331  ros::Subscriber perch_state_sub_, inertia_sub_;
332 
336 
338 
339  std::shared_ptr<ff_util::ConfigClient> choreographer_cfg_;
340  std::shared_ptr<ff_util::ConfigClient> mapper_cfg_;
341 
344 
345  std::vector<Action> running_actions_;
346 
347  // Action timeouts
353 
356 
363 };
364 typedef std::unique_ptr<Executive> ExecutivePtr;
365 } // namespace executive
366 #endif // EXECUTIVE_EXECUTIVE_H_
executive::Executive::SetZones
bool SetZones(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3017
executive::Executive::StopGuestScience
bool StopGuestScience(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3426
executive::Executive::sys_monitor_heartbeat_timer_
ros::Timer sys_monitor_heartbeat_timer_
Definition: executive.h:334
executive::Executive::zones_client_
ros::ServiceClient zones_client_
Definition: executive.h:311
executive::Executive::SetCameraStreaming
bool SetCameraStreaming(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2249
executive::Executive::GuestScienceAckCallback
void GuestScienceAckCallback(ff_msgs::AckStampedConstPtr const &ack)
Definition: executive.cc:179
executive::Executive::GetRunPlanCmdId
std::string GetRunPlanCmdId()
Definition: executive.cc:1025
executive::Executive::Executive
Executive()
Definition: executive.cc:27
executive::Executive::DockStateCallback
void DockStateCallback(ff_msgs::DockStateConstPtr const &state)
Definition: executive.cc:127
executive::Executive::Prepare
bool Prepare(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1928
executive::Executive::ack_
ff_msgs::AckStamped ack_
Definition: executive.h:281
executive::Executive::ProcessGuestScienceCommand
bool ProcessGuestScienceCommand(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1477
executive::Executive::perch_ac_
ExecutiveActionClient< ff_msgs::PerchAction > perch_ac_
Definition: executive.h:275
executive::Executive::AutoReturn
bool AutoReturn(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1632
executive::Executive::current_inertia_
geometry_msgs::InertiaStampedConstPtr current_inertia_
Definition: executive.h:304
executive::Executive::gs_state_sub_
ros::Subscriber gs_state_sub_
Definition: executive.h:330
executive::Executive::Undock
bool Undock(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3513
executive::Executive::live_led_on_
bool live_led_on_
Definition: executive.h:358
executive::Executive::choreographer_cfg_
std::shared_ptr< ff_util::ConfigClient > choreographer_cfg_
Definition: executive.h:339
executive::Executive::GetPlanExecState
uint8_t GetPlanExecState()
Definition: executive.cc:1021
executive::Executive::GuestScienceStartStopRestartCmdTimeoutCallback
void GuestScienceStartStopRestartCmdTimeoutCallback(ros::TimerEvent const &te)
Definition: executive.cc:264
executive::Executive::SetPlanner
bool SetPlanner(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2918
executive::Executive::perch_cam_enable_client_
ros::ServiceClient perch_cam_enable_client_
Definition: executive.h:316
executive::Executive::SetCheckZones
bool SetCheckZones(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2369
executive::Executive::PerchResultCallback
void PerchResultCallback(ff_util::FreeFlyerActionState::Enum const &state, ff_msgs::PerchResultConstPtr const &result)
Definition: executive.cc:956
executive::Executive::~Executive
~Executive()
Definition: executive.cc:57
executive::Executive::DockResultCallback
void DockResultCallback(ff_util::FreeFlyerActionState::Enum const &state, ff_msgs::DockResultConstPtr const &result)
Definition: executive.cc:865
executive::Executive::SetCheckObstacles
bool SetCheckObstacles(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2348
executive::Executive::UnloadNodelet
bool UnloadNodelet(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3549
executive::Executive::data_sub_
ros::Subscriber data_sub_
Definition: executive.h:329
executive::Executive::gs_cmd_pub_
ros::Publisher gs_cmd_pub_
Definition: executive.h:309
executive::Executive::sys_monitor_init_fault_response_
ff_msgs::CommandStampedPtr sys_monitor_init_fault_response_
Definition: executive.h:283
executive::Executive::IsActionRunning
bool IsActionRunning(Action action)
Definition: executive.cc:725
executive::Executive::sequencer_
sequencer::Sequencer sequencer_
Definition: executive.h:337
executive::Executive::NoOp
bool NoOp(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1875
executive::Executive::allow_blind_flying_
bool allow_blind_flying_
Definition: executive.h:357
executive::Executive::SetPlanExecState
void SetPlanExecState(uint8_t state)
Definition: executive.cc:1074
executive::Executive::dock_state_
ff_msgs::DockStateConstPtr dock_state_
Definition: executive.h:290
executive::Executive::motion_feedback_timeout_
double motion_feedback_timeout_
Definition: executive.h:349
executive::Executive::StopArm
bool StopArm(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3408
executive::Executive::gs_custom_command_timer_
ros::Timer gs_custom_command_timer_
Definition: executive.h:333
executive::Executive::plan_sub_
ros::Subscriber plan_sub_
Definition: executive.h:329
executive::Executive::running_actions_
std::vector< Action > running_actions_
Definition: executive.h:345
executive::Executive::sys_monitor_heartbeat_fault_blocking_
bool sys_monitor_heartbeat_fault_blocking_
Definition: executive.h:359
executive::Executive::FillMotionGoal
bool FillMotionGoal(Action action, ff_msgs::CommandStampedPtr const &cmd=nullptr)
Definition: executive.cc:645
executive::Executive::set_dock_cam_exposure_client_
ros::ServiceClient set_dock_cam_exposure_client_
Definition: executive.h:319
executive::Executive::localization_result_timeout_
double localization_result_timeout_
Definition: executive.h:351
executive::Executive::payload_power_client_
ros::ServiceClient payload_power_client_
Definition: executive.h:318
executive::Executive::AreActionsRunning
bool AreActionsRunning()
Definition: executive.cc:479
executive::Executive::gs_custom_cmd_id_
std::string gs_custom_cmd_id_
Definition: executive.h:343
sequencer::Sequencer
Definition: sequencer.h:49
ff_util::FreeFlyerServiceClient< ff_hw_msgs::ConfigureSystemLeds >
executive::Executive::StopAllMotion
bool StopAllMotion(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3244
executive::Executive::state_
OpState * state_
Definition: executive.h:269
executive::Executive::dock_goal_
ff_msgs::DockGoal dock_goal_
Definition: executive.h:297
executive::Executive::camera_state_sub_
ros::Subscriber camera_state_sub_
Definition: executive.h:330
ff_flight.h
executive::Executive::front_flashlight_client_
ros::ServiceClient front_flashlight_client_
Definition: executive.h:312
executive::Executive::motion_goal_
ff_msgs::MotionGoal motion_goal_
Definition: executive.h:299
executive::Executive::sys_monitor_init_fault_blocking_
bool sys_monitor_init_fault_blocking_
Definition: executive.h:360
executive::Executive::SetEnableAutoReturn
bool SetEnableAutoReturn(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2520
executive::Executive::dock_result_timeout_
double dock_result_timeout_
Definition: executive.h:350
executive::Executive::sys_monitor_init_fault_occurring_
bool sys_monitor_init_fault_occurring_
Definition: executive.h:362
executive::Executive::sys_monitor_startup_time_secs_
double sys_monitor_startup_time_secs_
Definition: executive.h:352
executive::Executive::dock_cam_enable_client_
ros::ServiceClient dock_cam_enable_client_
Definition: executive.h:313
executive::Executive::perch_cam_config_client_
ros::ServiceClient perch_cam_config_client_
Definition: executive.h:316
executive::Executive::LedConnectedCallback
void LedConnectedCallback()
Definition: executive.cc:282
executive::Executive::perch_state_sub_
ros::Subscriber perch_state_sub_
Definition: executive.h:331
executive::Executive::led_connected_timeout_
double led_connected_timeout_
Definition: executive.h:351
executive::Executive::GetMobilityState
ff_msgs::MobilityState GetMobilityState()
Definition: executive.cc:1017
ff_nodelet.h
executive::Executive::SetMobilityState
void SetMobilityState()
Definition: executive.cc:1031
executive::Executive::dock_cam_config_client_
ros::ServiceClient dock_cam_config_client_
Definition: executive.h:313
executive::Action
Action
Definition: executive_action_client.h:29
executive::Executive::agent_state_
ff_msgs::AgentStateStamped agent_state_
Definition: executive.h:279
executive::Executive::SkipPlanStep
bool SkipPlanStep(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3170
executive::Executive::laser_enable_client_
ros::ServiceClient laser_enable_client_
Definition: executive.h:311
executive::Executive::PausePlan
bool PausePlan(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1881
executive::Executive::mapper_cfg_
std::shared_ptr< ff_util::ConfigClient > mapper_cfg_
Definition: executive.h:340
executive::Executive::GetPlanCommand
ff_msgs::CommandStampedPtr GetPlanCommand()
Definition: executive.cc:1582
executive::Executive::gs_ack_sub_
ros::Subscriber gs_ack_sub_
Definition: executive.h:328
executive::Executive::RemoveAction
bool RemoveAction(Action action)
Definition: executive.cc:818
executive::Executive::primary_apk_running_
std::string primary_apk_running_
Definition: executive.h:342
executive::Executive::StartWaitTimer
void StartWaitTimer(float duration)
Definition: executive.cc:1561
executive::Executive::localization_goal_
ff_msgs::LocalizationGoal localization_goal_
Definition: executive.h:298
sequencer.h
executive::Executive::cmd_sub_
ros::Subscriber cmd_sub_
Definition: executive.h:328
executive::Executive::ResetEkf
bool ResetEkf(std::string const &cmd_id)
Definition: executive.cc:1553
executive::Executive::CheckServiceExists
bool CheckServiceExists(ros::ServiceClient &serviceIn, std::string const &serviceName, std::string const &cmd_in)
Definition: executive.cc:1135
executive::Executive::SetOpState
void SetOpState(OpState *state)
Definition: executive.cc:1063
executive::Executive::zones_
ff_msgs::CompressedFileConstPtr zones_
Definition: executive.h:287
executive::Executive::MotionStateCallback
void MotionStateCallback(ff_msgs::MotionStatePtr const &state)
Definition: executive.cc:300
executive::Executive::PublishCmdAck
void PublishCmdAck(std::string const &cmd_id, uint8_t completed_status=ff_msgs::AckCompletedStatus::OK, std::string const &message="", uint8_t status=ff_msgs::AckStatus::COMPLETED)
Definition: executive.cc:983
executive::Executive::FillArmGoal
bool FillArmGoal(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:536
executive::Executive::FaultStateCallback
void FaultStateCallback(ff_msgs::FaultStateConstPtr const &state)
Definition: executive.cc:145
executive::Executive::WaitCallback
void WaitCallback(ros::TimerEvent const &te)
Definition: executive.cc:465
executive::Executive::nav_cam_config_client_
ros::ServiceClient nav_cam_config_client_
Definition: executive.h:315
executive::Executive::FailCommandIfMoving
bool FailCommandIfMoving(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1245
executive::Executive::ConfigureMobility
bool ConfigureMobility(bool move_to_start, std::string &err_msg)
Definition: executive.cc:1178
executive::Executive::Wait
bool Wait(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3617
executive::Executive::ReacquirePosition
bool ReacquirePosition(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1941
executive::Executive::AckMobilityStateIssue
void AckMobilityStateIssue(ff_msgs::CommandStampedPtr const &cmd, std::string const &current_mobility_state, std::string const &accepted_mobility_state="")
Definition: executive.cc:1086
executive::Executive::Unterminate
bool Unterminate(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3589
executive::Executive::pub_queue_size_
int pub_queue_size_
Definition: executive.h:354
executive::Executive::motion_sub_
ros::Subscriber motion_sub_
Definition: executive.h:329
executive::Executive::DataToDiskCallback
void DataToDiskCallback(ff_msgs::CompressedFileConstPtr const &data)
Definition: executive.cc:118
executive::Executive::sys_monitor_heartbeat_timeout_
double sys_monitor_heartbeat_timeout_
Definition: executive.h:352
executive::Executive::PublishPlan
void PublishPlan()
Definition: executive.cc:1002
executive::Executive::MotionFeedbackCallback
void MotionFeedbackCallback(ff_msgs::MotionFeedbackConstPtr const &feedback)
Definition: executive.cc:921
executive::Executive::gs_command_timeout_
double gs_command_timeout_
Definition: executive.h:348
executive::Executive::SetCameraRecording
bool SetCameraRecording(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2150
executive::Executive::MsToSec
ros::Time MsToSec(std::string timestamp)
Definition: executive.cc:1366
executive::Executive::dock_state_sub_
ros::Subscriber dock_state_sub_
Definition: executive.h:328
executive::Executive::RunPlan
bool RunPlan(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1968
executive::Executive::motion_ac_
ExecutiveActionClient< ff_msgs::MotionAction > motion_ac_
Definition: executive.h:274
executive::Executive::ReadCommand
bool ReadCommand(config_reader::ConfigReader::Table *response, ff_msgs::CommandStampedPtr cmd)
Definition: executive.cc:4207
executive::Executive::ArmResultCallback
void ArmResultCallback(ff_util::FreeFlyerActionState::Enum const &state, ff_msgs::ArmResultConstPtr const &result)
Definition: executive.cc:839
executive::Executive::run_plan_cmd_id_
std::string run_plan_cmd_id_
Definition: executive.h:342
executive::Executive::GripperControl
bool GripperControl(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1799
plan_io.h
executive::Executive::SetMap
bool SetMap(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2793
executive::ExecutiveActionClient< ff_msgs::ArmAction >
executive::Executive::SetTelemetryRate
bool SetTelemetryRate(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2950
executive::Executive::reset_map_client_
ros::ServiceClient reset_map_client_
Definition: executive.h:323
executive::Executive::SetHolonomicMode
bool SetHolonomicMode(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2714
executive::Executive::cf_ack_
ff_msgs::CompressedFileAck cf_ack_
Definition: executive.h:286
executive::Executive::SetEnableReplan
bool SetEnableReplan(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2557
executive::Executive::sci_cam_config_client_
ros::ServiceClient sci_cam_config_client_
Definition: executive.h:317
executive::Executive::enable_recording_client_
ros::ServiceClient enable_recording_client_
Definition: executive.h:322
executive::Executive::Unperch
bool Unperch(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3554
executive::Executive::cmd_ack_pub_
ros::Publisher cmd_ack_pub_
Definition: executive.h:308
executive::Executive::PowerItem
bool PowerItem(ff_msgs::CommandStampedPtr const &cmd, bool on)
Definition: executive.cc:1375
executive::Executive::reload_params_timer_
ros::Timer reload_params_timer_
Definition: executive.h:334
executive::Executive::SetRunPlanCmdId
void SetRunPlanCmdId(std::string cmd_id)
Definition: executive.cc:1079
executive::Executive::nav_cam_enable_client_
ros::ServiceClient nav_cam_enable_client_
Definition: executive.h:315
executive::Executive::enable_astrobee_intercommunication_client_
ros::ServiceClient enable_astrobee_intercommunication_client_
Definition: executive.h:324
executive::Executive::plan_pub_
ros::Publisher plan_pub_
Definition: executive.h:308
sequencer::ItemType
ItemType
Definition: sequencer.h:43
executive::Executive::ArmPanAndTilt
bool ArmPanAndTilt(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1627
ff_util::FreeFlyerNodelet
Definition: ff_nodelet.h:57
executive::Executive::Perch
bool Perch(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1886
ff_names.h
executive::Executive::inertia_sub_
ros::Subscriber inertia_sub_
Definition: executive.h:331
executive::Executive::GetSetPlanInertia
bool GetSetPlanInertia(std::string const &cmd_id)
Definition: executive.cc:1586
executive::Executive::PlanCallback
void PlanCallback(ff_msgs::CompressedFileConstPtr const &plan)
Definition: executive.cc:379
executive::Executive::SwitchLocalization
bool SwitchLocalization(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3475
executive::Executive::StartAction
bool StartAction(Action action, std::string const &cmd_id)
Definition: executive.cc:734
executive::Executive::eps_terminate_client_
ros::ServiceClient eps_terminate_client_
Definition: executive.h:323
ff_service.h
executive::Executive::ArmControl
bool ArmControl(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1100
executive::Executive::StopRecording
bool StopRecording(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3431
executive::Executive::PublishPlanStatus
void PublishPlanStatus(uint8_t status)
Definition: executive.cc:1006
executive::Executive::data_to_disk_
ff_msgs::CompressedFileConstPtr data_to_disk_
Definition: executive.h:287
config_reader::ConfigReader
Definition: config_reader.h:48
executive::Executive::guest_science_config_
ff_msgs::GuestScienceConfigConstPtr guest_science_config_
Definition: executive.h:292
executive::Executive::motion_state_
ff_msgs::MotionStatePtr motion_state_
Definition: executive.h:293
executive::Executive::arm_goal_
ff_msgs::ArmGoal arm_goal_
Definition: executive.h:296
executive::Executive::StowArm
bool StowArm(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3462
executive::Executive::StartRecording
bool StartRecording(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3199
executive::Executive::agent_state_pub_
ros::Publisher agent_state_pub_
Definition: executive.h:308
executive::Executive::IdlePropulsion
bool IdlePropulsion(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1804
executive::ExecutivePtr
std::unique_ptr< Executive > ExecutivePtr
Definition: executive.h:364
executive::Executive::StopWaitTimer
void StopWaitTimer()
Definition: executive.cc:1566
executive::Executive::set_rate_client_
ros::ServiceClient set_rate_client_
Definition: executive.h:321
executive::Executive::GuestScienceStateCallback
void GuestScienceStateCallback(ff_msgs::GuestScienceStateConstPtr const &state)
Definition: executive.cc:202
config_client.h
executive::Executive::SysMonitorHeartbeatCallback
void SysMonitorHeartbeatCallback(ff_msgs::HeartbeatConstPtr const &heartbeat)
Definition: executive.cc:387
executive::Executive::SetInertia
bool SetInertia(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2734
executive::Executive::SetCamera
bool SetCamera(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1994
executive::Executive::SetPlan
bool SetPlan(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2877
executive::Executive::plan_
ff_msgs::CompressedFileConstPtr plan_
Definition: executive.h:287
ff_action.h
executive::Executive::gs_start_stop_restart_command_timer_
ros::Timer gs_start_stop_restart_command_timer_
Definition: executive.h:333
executive::Executive::SetDataToDisk
bool SetDataToDisk(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2390
executive::Executive::SetExposure
bool SetExposure(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2577
ff_util::FreeFlyerActionState::Enum
Enum
Definition: ff_action.h:41
executive::Executive::set_inertia_client_
ros::ServiceClient set_inertia_client_
Definition: executive.h:321
executive::Executive::RestartGuestScience
bool RestartGuestScience(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1963
executive::Executive::perch_state_
ff_msgs::PerchStateConstPtr perch_state_
Definition: executive.h:294
executive::Executive::pmc_enable_client_
ros::ServiceClient pmc_enable_client_
Definition: executive.h:318
config_reader.h
executive::Executive::camera_states_
ff_msgs::CameraStatesStamped camera_states_
Definition: executive.h:289
executive::Executive::nh_
ros::NodeHandle nh_
Definition: executive.h:306
executive::Executive::LoadUnloadNodelet
bool LoadUnloadNodelet(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1276
executive_action_client.h
executive::Executive::arm_ac_
ExecutiveActionClient< ff_msgs::ArmAction > arm_ac_
Definition: executive.h:271
executive::Executive::SetEnableImmediate
bool SetEnableImmediate(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2537
executive::Executive::cf_ack_pub_
ros::Publisher cf_ack_pub_
Definition: executive.h:309
executive::Executive::arm_feedback_timeout_
double arm_feedback_timeout_
Definition: executive.h:349
executive::Executive::fault_state_
ff_msgs::FaultStateConstPtr fault_state_
Definition: executive.h:291
executive::Executive::set_collision_distance_client_
ros::ServiceClient set_collision_distance_client_
Definition: executive.h:326
executive::Executive::gs_start_stop_restart_cmd_id_
std::string gs_start_stop_restart_cmd_id_
Definition: executive.h:343
executive::Executive::AckCurrentPlanItem
bool AckCurrentPlanItem()
Definition: executive.cc:1572
executive::Executive::SetOperatingLimits
bool SetOperatingLimits(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2826
executive::Executive::gs_config_sub_
ros::Subscriber gs_config_sub_
Definition: executive.h:330
executive::Executive::sci_cam_enable_client_
ros::ServiceClient sci_cam_enable_client_
Definition: executive.h:317
config_reader::ConfigReader::Table
Definition: config_reader.h:54
executive::Executive::unload_load_nodelet_client_
ros::ServiceClient unload_load_nodelet_client_
Definition: executive.h:325
executive::Executive::Initialize
virtual void Initialize(ros::NodeHandle *nh)
Definition: executive.cc:3632
executive::Executive::PublishAgentState
void PublishAgentState()
Definition: executive.cc:4342
executive::Executive::DeployArm
bool DeployArm(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1698
executive::Executive::sys_monitor_heartbeat_fault_occurring_
bool sys_monitor_heartbeat_fault_occurring_
Definition: executive.h:361
executive::Executive::LocalizationResultCallback
void LocalizationResultCallback(ff_util::FreeFlyerActionState::Enum const &state, ff_msgs::LocalizationResultConstPtr const &result)
Definition: executive.cc:891
executive::Executive::ConfigureLed
bool ConfigureLed(ff_hw_msgs::ConfigureSystemLeds &led_srv)
Definition: executive.cc:1161
executive::Executive::MotionResultCallback
void MotionResultCallback(ff_util::FreeFlyerActionState::Enum const &state, ff_msgs::MotionResultConstPtr const &result)
Definition: executive.cc:930
executive::Executive::SetFlashlightBrightness
bool SetFlashlightBrightness(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:2640
executive::Executive::localization_ac_
ExecutiveActionClient< ff_msgs::LocalizationAction > localization_ac_
Definition: executive.h:273
executive::Executive::CameraStatesCallback
void CameraStatesCallback(ff_msgs::CameraStatesStampedConstPtr const &state)
Definition: executive.cc:61
executive::Executive::wait_timer_
ros::Timer wait_timer_
Definition: executive.h:334
executive::Executive::CancelAction
void CancelAction(Action action, std::string cmd)
Definition: executive.cc:486
executive::Executive
Definition: executive.h:100
executive::Executive::ReadParams
bool ReadParams()
Definition: executive.cc:4005
executive::Executive::heartbeat_sub_
ros::Subscriber heartbeat_sub_
Definition: executive.h:329
state
uint8_t state
Definition: signal_lights.h:90
executive::Executive::fault_state_sub_
ros::Subscriber fault_state_sub_
Definition: executive.h:328
executive::Executive::Dock
bool Dock(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1711
executive::Executive::action_active_timeout_
double action_active_timeout_
Definition: executive.h:348
executive::Executive::haz_cam_config_client_
ros::ServiceClient haz_cam_config_client_
Definition: executive.h:314
executive::Executive::zones_sub_
ros::Subscriber zones_sub_
Definition: executive.h:329
executive::Executive::haz_cam_enable_client_
ros::ServiceClient haz_cam_enable_client_
Definition: executive.h:314
executive::Executive::GuestScienceConfigCallback
void GuestScienceConfigCallback(ff_msgs::GuestScienceConfigConstPtr const &config)
Definition: executive.cc:197
executive::Executive::CustomGuestScience
bool CustomGuestScience(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1671
executive::Executive::Fault
bool Fault(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1777
executive
Definition: executive.h:87
executive::Executive::sys_monitor_heartbeat_fault_response_
ff_msgs::CommandStampedPtr sys_monitor_heartbeat_fault_response_
Definition: executive.h:284
executive::Executive::ZonesCallback
void ZonesCallback(ff_msgs::CompressedFileConstPtr const &zones)
Definition: executive.cc:470
executive::Executive::mapper_config_params_
config_reader::ConfigReader mapper_config_params_
Definition: executive.h:277
executive::Executive::CmdCallback
void CmdCallback(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:98
executive::Executive::LoadNodelet
bool LoadNodelet(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1870
executive::Executive::plan_status_pub_
ros::Publisher plan_status_pub_
Definition: executive.h:308
executive::Executive::dock_ac_
ExecutiveActionClient< ff_msgs::DockAction > dock_ac_
Definition: executive.h:272
executive::Executive::EnableAstrobeeIntercomms
bool EnableAstrobeeIntercomms(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1745
localization_common::Time
double Time
Definition: time.h:23
executive::Executive::PerchStateCallback
void PerchStateCallback(ff_msgs::PerchStateConstPtr const &state)
Definition: executive.cc:350
executive::Executive::FillDockGoal
bool FillDockGoal(ff_msgs::CommandStampedPtr const &cmd, bool return_to_dock)
Definition: executive.cc:602
executive::Executive::SysMonitorTimeoutCallback
void SysMonitorTimeoutCallback(ros::TimerEvent const &te)
Definition: executive.cc:450
executive::Executive::sys_monitor_startup_timer_
ros::Timer sys_monitor_startup_timer_
Definition: executive.h:335
executive::Executive::PowerItemOn
bool PowerItemOn(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1923
executive::Executive::sub_queue_size_
int sub_queue_size_
Definition: executive.h:355
executive::Executive::set_nav_cam_exposure_client_
ros::ServiceClient set_nav_cam_exposure_client_
Definition: executive.h:320
executive::Executive::PowerItemOff
bool PowerItemOff(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1918
executive::Executive::GetCurrentPlanItemType
sequencer::ItemType GetCurrentPlanItemType()
Definition: executive.cc:1578
executive::Executive::GuestScienceCustomCmdTimeoutCallback
void GuestScienceCustomCmdTimeoutCallback(ros::TimerEvent const &te)
Definition: executive.cc:252
executive::Executive::set_data_client_
ros::ServiceClient set_data_client_
Definition: executive.h:322
executive::Executive::GetSetPlanOperatingLimits
void GetSetPlanOperatingLimits()
Definition: executive.cc:1616
executive::Executive::back_flashlight_client_
ros::ServiceClient back_flashlight_client_
Definition: executive.h:312
executive::Executive::perch_result_timeout_
double perch_result_timeout_
Definition: executive.h:350
executive::Executive::ReadMapperParams
bool ReadMapperParams()
Definition: executive.cc:4147
executive::OpState
Definition: op_state.h:45
executive::Executive::InertiaCallback
void InertiaCallback(geometry_msgs::InertiaStampedConstPtr const &inertia)
Definition: executive.cc:277
executive::Executive::perch_goal_
ff_msgs::PerchGoal perch_goal_
Definition: executive.h:300
executive::Executive::StartGuestScience
bool StartGuestScience(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:3194
executive::Executive::config_params_
config_reader::ConfigReader config_params_
Definition: executive.h:277
executive::Executive::led_client_
ff_util::FreeFlyerServiceClient< ff_hw_msgs::ConfigureSystemLeds > led_client_
Definition: executive.h:302
executive::Executive::InitializeBias
bool InitializeBias(ff_msgs::CommandStampedPtr const &cmd)
Definition: executive.cc:1850
executive::Executive::CheckStoppedOrDrifting
bool CheckStoppedOrDrifting(std::string const &cmd_id, std::string const &cmd_name)
Definition: executive.cc:1147