moveit2
The MoveIt Motion Planning Framework for ROS 2.
moveit_setup_assistant
moveit_setup_simulation
include
moveit_setup_simulation
simulation_widget.hpp
Go to the documentation of this file.
1
/*********************************************************************
2
* Software License Agreement (BSD License)
3
*
4
* Copyright (c) 2018, Mohamad Ayman.
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
* * The name of Mohamad Ayman may not be used to endorse or promote products derived
18
* from this software without specific prior written permission.
19
*
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
* POSSIBILITY OF SUCH DAMAGE.
32
*********************************************************************/
33
34
/* Author: Mohamad Ayman */
35
36
#pragma once
37
38
// Qt
39
class
QLabel;
40
class
QTextEdit;
41
class
QPushButton;
42
43
// SA
44
#include <
moveit_setup_framework/qt/setup_step_widget.hpp
>
45
#include <
moveit_setup_simulation/simulation.hpp
>
46
47
namespace
moveit_setup
48
{
49
namespace
simulation
50
{
51
// ******************************************************************************************
52
// ******************************************************************************************
53
// Class for showing changes needed to help user bring his robot into gazebo simulation
54
// ******************************************************************************************
55
// ******************************************************************************************
56
class
SimulationWidget
:
public
SetupStepWidget
57
{
58
Q_OBJECT
59
60
public
:
61
// ******************************************************************************************
62
// Public Functions
63
// ******************************************************************************************
64
65
void
onInit
()
override
;
66
void
focusGiven
()
override
;
67
bool
focusLost
()
override
;
68
69
SetupStep
&
getSetupStep
()
override
70
{
71
return
setup_step_;
72
}
73
74
private
Q_SLOTS:
75
// ******************************************************************************************
76
// Slot Event Functions
77
// ******************************************************************************************
78
80
void
overwriteURDF();
82
void
openURDF();
84
void
copyURDF();
85
86
private
:
87
// ******************************************************************************************
88
// Qt Components
89
// ******************************************************************************************
90
91
QTextEdit* simulation_text_;
92
QLabel* no_changes_label_;
93
QPushButton* btn_overwrite_;
94
QPushButton* btn_open_;
95
QLabel* copy_urdf_;
96
97
Simulation
setup_step_;
98
};
99
100
}
// namespace simulation
101
}
// namespace moveit_setup
moveit_setup::SetupStepWidget
The GUI code for one SetupStep.
Definition:
setup_step_widget.hpp:49
moveit_setup::SetupStep
Contains all of the non-GUI code necessary for doing one "screen" worth of setup.
Definition:
setup_step.hpp:47
moveit_setup::simulation::SimulationWidget
Definition:
simulation_widget.hpp:57
moveit_setup::simulation::SimulationWidget::focusGiven
void focusGiven() override
function called when widget is activated, allows to update/initialize GUI
Definition:
simulation_widget.cpp:128
moveit_setup::simulation::SimulationWidget::focusLost
bool focusLost() override
function called when widget loses focus, although switching away can be rejected
Definition:
simulation_widget.cpp:164
moveit_setup::simulation::SimulationWidget::getSetupStep
SetupStep & getSetupStep() override
Return a reference to the SetupStep object.
Definition:
simulation_widget.hpp:69
moveit_setup::simulation::SimulationWidget::onInit
void onInit() override
Definition:
simulation_widget.cpp:62
moveit_setup::simulation::Simulation
Definition:
simulation.hpp:46
moveit_setup
Definition:
launch_bundle.hpp:42
setup_step_widget.hpp
simulation.hpp
Generated by
1.9.1