se2_planning_rviz/src/PlanningPanel.cpp
void PlanningPanel::save(rviz::Config config) const
{
rviz::Panel::save(config);
config.mapSetValue("path_request_topic", planningServiceName_);
config.mapSetValue("get_current_state_service", currentStateServiceName_);
config.mapSetValue("controller_command_topic", controllerCommandTopicName_);



auto getCheckedStatusAsString = [](QCheckBox *checkBox){
  const std::string checkStatus = checkBox->isChecked() ? "checked" : "not_checked";
  return QString::fromStdString(checkStatus);;
};
QString checkedStatus = getCheckedStatusAsString(approachPosePlanningCheckBox_);
config.mapSetValue("plan_approach_pose",checkedStatus);
checkedStatus = getCheckedStatusAsString(currentStateAsStartCheckBox_);
config.mapSetValue("use_current_pose_as_start", checkedStatus);

}
// Save all configuration data from this panel to the given
// Config object.  It is important here that you call save()
// on the parent class so the class id and panel name get saved.
Save all configuration data from this panel to the given
Config object.  It is important here that you call save()
on the parent class so the class id and panel name get saved.
Save all configuration data from this panel to the given Config object . It is important here that you call save () on the parent class so the class id and panel name get saved .
void PlanningPanel::save(rviz::Config config) const
{
rviz::Panel::save(config);
config.mapSetValue("path_request_topic", planningServiceName_);
config.mapSetValue("get_current_state_service", currentStateServiceName_);
config.mapSetValue("controller_command_topic", controllerCommandTopicName_);
auto getCheckedStatusAsString = [](QCheckBox *checkBox){
  const std::string checkStatus = checkBox->isChecked() ? "checked" : "not_checked";
  return QString::fromStdString(checkStatus);;
};
QString checkedStatus = getCheckedStatusAsString(approachPosePlanningCheckBox_);
config.mapSetValue("plan_approach_pose",checkedStatus);
checkedStatus = getCheckedStatusAsString(currentStateAsStartCheckBox_);
config.mapSetValue("use_current_pose_as_start", checkedStatus);
}
void PlanningPanel :: save ( rviz :: Config config ) const { rviz :: Panel :: save ( config ) ; config . mapSetValue ( " " , planningServiceName_ ) ; config . mapSetValue ( " " , currentStateServiceName_ ) ; config . mapSetValue ( " " , controllerCommandTopicName_ ) ; auto getCheckedStatusAsString = [ ] ( QCheckBox * checkBox ) { const std :: string checkStatus = checkBox -> isChecked ( ) ? " " : " " ; return QString :: fromStdString ( checkStatus ) ; ; } ; QString checkedStatus = getCheckedStatusAsString ( approachPosePlanningCheckBox_ ) ; config . mapSetValue ( " " , checkedStatus ) ; checkedStatus = getCheckedStatusAsString ( currentStateAsStartCheckBox_ ) ; config . mapSetValue ( " " , checkedStatus ) ; }
Save all configuration data from this panel to the given
Config object.
Save all configuration data from this panel to the given Config object .