src
widgets
group_edit_widget.h
Go to the documentation of this file.
1
/*********************************************************************
2
* Software License Agreement (BSD License)
3
*
4
* Copyright (c) 2012, Willow Garage, Inc.
5
* All rights reserved.
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions
9
* are met:
10
*
11
* * Redistributions of source code must retain the above copyright
12
* notice, this list of conditions and the following disclaimer.
13
* * Redistributions in binary form must reproduce the above
14
* copyright notice, this list of conditions and the following
15
* disclaimer in the documentation and/or other materials provided
16
* with the distribution.
17
* * Neither the name of Willow Garage nor the names of its
18
* contributors may be used to endorse or promote products derived
19
* from this software without specific prior written permission.
20
*
21
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32
* POSSIBILITY OF SUCH DAMAGE.
33
*********************************************************************/
34
35
/* Author: Dave Coleman */
36
37
#pragma once
38
39
#include <QWidget>
40
class
QComboBox;
41
class
QLabel;
42
class
QLineEdit;
43
class
QDoubleSpinBox;
44
class
QPushButton;
45
46
#ifndef Q_MOC_RUN
47
#include <
moveit/setup_assistant/tools/moveit_config_data.h
>
48
#endif
49
50
namespace
moveit_setup_assistant
51
{
52
class
GroupEditWidget
:
public
QWidget
53
{
54
Q_OBJECT
55
56
private
:
57
const
int
FORM_CONTROL_WIDTH
= 400;
58
const
int
DECIMALS_TOLERANCE
= 4;
59
const
double
MIN_TOLERANCE
= 1e-4;
60
const
double
MAX_TOLERANCE
= 1.0;
61
const
double
STEP_TOLERANCE
= 1e-4;
62
63
public
:
64
// ******************************************************************************************
65
// Public Functions
66
// ******************************************************************************************
67
69
GroupEditWidget
(QWidget* parent,
const
MoveItConfigDataPtr& config_data);
70
72
void
setSelected
(
const
std::string& group_name);
73
75
void
loadKinematicPlannersComboBox
();
76
77
// ******************************************************************************************
78
// Qt Components
79
// ******************************************************************************************
80
81
QLabel*
title_
;
// specify the title from the parent widget
82
QLineEdit*
group_name_field_
;
83
QComboBox*
kinematics_solver_field_
;
84
QLineEdit*
kinematics_resolution_field_
;
85
QLineEdit*
kinematics_timeout_field_
;
86
QDoubleSpinBox*
goal_joint_tolerance_field_
;
87
QDoubleSpinBox*
goal_position_tolerance_field_
;
88
QDoubleSpinBox*
goal_orientation_tolerance_field_
;
89
QLineEdit*
kinematics_parameters_file_field_
;
90
QComboBox*
default_planner_field_
;
91
QPushButton*
btn_delete_
;
// this button is hidden for new groups
92
QPushButton*
btn_save_
;
// this button is hidden for new groups
93
QWidget*
new_buttons_widget_
;
// for showing/hiding the new group buttons
94
95
private
Q_SLOTS:
96
97
// ******************************************************************************************
98
// Slot Event Functions
99
// ******************************************************************************************
100
102
void
selectKinematicsFile
();
103
104
Q_SIGNALS:
105
106
// ******************************************************************************************
107
// Emitted Signals
108
// ******************************************************************************************
109
111
void
saveJoints
();
112
114
void
saveLinks
();
115
117
void
saveChain
();
118
120
void
saveSubgroups
();
121
123
void
save
();
124
126
void
cancelEditing
();
127
129
void
deleteGroup
();
130
131
private
:
132
// ******************************************************************************************
133
// Variables
134
// ******************************************************************************************
135
137
moveit_setup_assistant::MoveItConfigDataPtr
config_data_
;
138
139
// ******************************************************************************************
140
// Private Functions
141
// ******************************************************************************************
142
};
143
}
// namespace moveit_setup_assistant
moveit_setup_assistant::GroupEditWidget::title_
QLabel * title_
Definition:
group_edit_widget.h:81
moveit_setup_assistant::GroupEditWidget::new_buttons_widget_
QWidget * new_buttons_widget_
Definition:
group_edit_widget.h:93
moveit_setup_assistant::GroupEditWidget::deleteGroup
void deleteGroup()
Event sent when delete is being requested for group.
moveit_setup_assistant::GroupEditWidget::saveChain
void saveChain()
Button event for new groups, progressing to adding a chain.
moveit_setup_assistant::GroupEditWidget::kinematics_resolution_field_
QLineEdit * kinematics_resolution_field_
Definition:
group_edit_widget.h:84
moveit_setup_assistant::GroupEditWidget::goal_joint_tolerance_field_
QDoubleSpinBox * goal_joint_tolerance_field_
Definition:
group_edit_widget.h:86
moveit_setup_assistant::GroupEditWidget::kinematics_solver_field_
QComboBox * kinematics_solver_field_
Definition:
group_edit_widget.h:83
moveit_setup_assistant::GroupEditWidget::config_data_
moveit_setup_assistant::MoveItConfigDataPtr config_data_
Contains all the configuration data for the setup assistant.
Definition:
group_edit_widget.h:137
moveit_setup_assistant::GroupEditWidget::btn_delete_
QPushButton * btn_delete_
Definition:
group_edit_widget.h:91
moveit_setup_assistant::GroupEditWidget::FORM_CONTROL_WIDTH
const int FORM_CONTROL_WIDTH
Definition:
group_edit_widget.h:57
moveit_setup_assistant::GroupEditWidget::kinematics_timeout_field_
QLineEdit * kinematics_timeout_field_
Definition:
group_edit_widget.h:85
moveit_setup_assistant::GroupEditWidget::loadKinematicPlannersComboBox
void loadKinematicPlannersComboBox()
Populate the combo dropdown box with kinematic planners.
Definition:
group_edit_widget.cpp:383
moveit_setup_assistant::GroupEditWidget::goal_position_tolerance_field_
QDoubleSpinBox * goal_position_tolerance_field_
Definition:
group_edit_widget.h:87
moveit_setup_assistant::GroupEditWidget
Definition:
group_edit_widget.h:52
moveit_config_data.h
moveit_setup_assistant::GroupEditWidget::GroupEditWidget
GroupEditWidget(QWidget *parent, const MoveItConfigDataPtr &config_data)
Constructor.
Definition:
group_edit_widget.cpp:91
moveit_setup_assistant::GroupEditWidget::saveLinks
void saveLinks()
Button event for new groups, progressing to adding links.
moveit_setup_assistant::GroupEditWidget::MIN_TOLERANCE
const double MIN_TOLERANCE
Definition:
group_edit_widget.h:59
moveit_setup_assistant::GroupEditWidget::saveJoints
void saveJoints()
Button event for new groups, progressing to adding joints.
moveit_setup_assistant::GroupEditWidget::btn_save_
QPushButton * btn_save_
Definition:
group_edit_widget.h:92
moveit_setup_assistant::GroupEditWidget::goal_orientation_tolerance_field_
QDoubleSpinBox * goal_orientation_tolerance_field_
Definition:
group_edit_widget.h:88
moveit_setup_assistant::GroupEditWidget::kinematics_parameters_file_field_
QLineEdit * kinematics_parameters_file_field_
Definition:
group_edit_widget.h:89
moveit_setup_assistant::GroupEditWidget::group_name_field_
QLineEdit * group_name_field_
Definition:
group_edit_widget.h:82
moveit_setup_assistant
Definition:
compute_default_collisions.h:46
moveit_setup_assistant::GroupEditWidget::save
void save()
Button event for just saving, when in edit mode.
moveit_setup_assistant::GroupEditWidget::MAX_TOLERANCE
const double MAX_TOLERANCE
Definition:
group_edit_widget.h:60
moveit_setup_assistant::GroupEditWidget::selectKinematicsFile
void selectKinematicsFile()
Shows a file dialog to select an additional parameter file for kinematics.
Definition:
group_edit_widget.cpp:442
moveit_setup_assistant::GroupEditWidget::saveSubgroups
void saveSubgroups()
Button event for new groups, progressing to adding subgroups.
moveit_setup_assistant::GroupEditWidget::DECIMALS_TOLERANCE
const int DECIMALS_TOLERANCE
Definition:
group_edit_widget.h:58
moveit_setup_assistant::GroupEditWidget::default_planner_field_
QComboBox * default_planner_field_
Definition:
group_edit_widget.h:90
moveit_setup_assistant::GroupEditWidget::setSelected
void setSelected(const std::string &group_name)
Set the previous data.
Definition:
group_edit_widget.cpp:289
moveit_setup_assistant::GroupEditWidget::STEP_TOLERANCE
const double STEP_TOLERANCE
Definition:
group_edit_widget.h:61
moveit_setup_assistant::GroupEditWidget::cancelEditing
void cancelEditing()
Event sent when user presses cancel button.
moveit_setup_assistant
Author(s): Dave Coleman
autogenerated on Sat May 3 2025 02:28:04