Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-gui
Commits
6bec8aef
Commit
6bec8aef
authored
Aug 23, 2018
by
Joseph Mirabel
Committed by
Joseph Mirabel
Aug 23, 2018
Browse files
Fix creation of locked joints.
parent
7c448ca8
Changes
5
Hide whitespace changes
Inline
Side-by-side
plugins/hppmanipulationwidgetsplugin/CMakeLists.txt
View file @
6bec8aef
...
...
@@ -33,7 +33,6 @@ GEPETTO_GUI_PLUGIN(hppmanipulationwidgetsplugin
linkwidget.hh
manipulationconstraintwidget.hh
manipulationncpicker.hh
manipulationlockedjoint.hh
HEADERS_NO_MOC
roadmap.hh
...
...
@@ -47,7 +46,6 @@ GEPETTO_GUI_PLUGIN(hppmanipulationwidgetsplugin
linkwidget.cc
manipulationconstraintwidget.cc
manipulationncpicker.cc
manipulationlockedjoint.cc
LINK_DEPENDENCIES
hppwidgetsplugin
...
...
plugins/hppmanipulationwidgetsplugin/hppmanipulationwidgetsplugin.cc
View file @
6bec8aef
...
...
@@ -21,7 +21,7 @@
#include
"hppmanipulationwidgetsplugin/linkwidget.hh"
#include
"hppmanipulationwidgetsplugin/manipulationconstraintwidget.hh"
#include
"hppwidgetsplugin/twojointsconstraint.hh"
#include
"hpp
manipulation
widgetsplugin/
manipulationlockedjo
int.hh"
#include
"hppwidgetsplugin/
listjointconstra
int.hh"
using
CORBA
::
ULong
;
...
...
@@ -521,7 +521,7 @@ namespace hpp {
constraintWidget_
->
addConstraint
(
new
PositionConstraint
(
this
));
constraintWidget_
->
addConstraint
(
new
OrientationConstraint
(
this
));
constraintWidget_
->
addConstraint
(
new
TransformConstraint
(
this
));
constraintWidget_
->
addConstraint
(
new
ManipulationLockedJo
int
(
this
));
constraintWidget_
->
addConstraint
(
new
LockedJointConstra
int
(
this
));
}
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
...
...
plugins/hppmanipulationwidgetsplugin/manipulationlockedjoint.cc
deleted
100644 → 0
View file @
7c448ca8
//
// Copyright (c) CNRS
// Authors: Joseph Mirabel and Heidy Dallard
//
#include
"hppmanipulationwidgetsplugin.hh"
#include
"manipulationlockedjoint.hh"
#include
<QListWidgetItem>
namespace
hpp
{
namespace
gui
{
ManipulationLockedJoint
::
ManipulationLockedJoint
(
HppManipulationWidgetsPlugin
*
plugin
)
:
ListJointConstraint
(
plugin
)
{
}
ManipulationLockedJoint
::~
ManipulationLockedJoint
()
{
}
QString
ManipulationLockedJoint
::
getName
()
const
{
return
"Locked Joint"
;
}
void
ManipulationLockedJoint
::
operator
()(
QString
const
&
/*name*/
)
{
QList
<
QListWidgetItem
*>
selected
=
jointList_
->
selectedItems
();
HppManipulationWidgetsPlugin
*
plugin
=
dynamic_cast
<
HppManipulationWidgetsPlugin
*>
(
plugin_
);
foreach
(
QListWidgetItem
*
item
,
selected
)
{
std
::
string
jointName
=
item
->
text
().
toStdString
().
c_str
();
hpp
::
floatSeq_var
config
=
plugin
->
client
()
->
robot
()
->
getJointConfig
(
jointName
.
c_str
());
plugin
->
client
()
->
problem
()
->
createLockedJoint
(
std
::
string
(
"lock_"
+
jointName
).
c_str
(),
jointName
.
c_str
(),
config
.
in
());
emit
constraintCreated
(
std
::
string
(
"lock_"
+
jointName
).
c_str
());
}
}
}
}
plugins/hppmanipulationwidgetsplugin/manipulationlockedjoint.hh
deleted
100644 → 0
View file @
7c448ca8
//
// Copyright (c) CNRS
// Authors: Joseph Mirabel and Heidy Dallard
//
#ifndef HPP_GUI_MANIPULATIONLOCKEDJOINT_HH
#define HPP_GUI_MANIPULATIONLOCKEDJOINT_HH
#include
"hppwidgetsplugin/listjointconstraint.hh"
namespace
hpp
{
namespace
gui
{
class
HppManipulationWidgetsPlugin
;
class
ManipulationLockedJoint
:
public
ListJointConstraint
{
Q_OBJECT
public:
ManipulationLockedJoint
(
HppManipulationWidgetsPlugin
*
plugin
);
virtual
~
ManipulationLockedJoint
();
virtual
QString
getName
()
const
;
virtual
void
operator
()(
QString
const
&
name
);
};
}
}
#endif // HPP_GUI_MANIPULATIONLOCKEDJOINT_HH
plugins/hppwidgetsplugin/listjointconstraint.cc
View file @
6bec8aef
...
...
@@ -63,9 +63,13 @@ namespace hpp {
QList
<
QListWidgetItem
*>
selected
=
jointList_
->
selectedItems
();
foreach
(
QListWidgetItem
*
item
,
selected
)
{
const
char
*
jointName
=
item
->
text
().
toStdString
().
c_str
();
hpp
::
floatSeq_var
config
=
plugin_
->
client
()
->
robot
()
->
getJointConfig
(
jointName
);
plugin_
->
client
()
->
problem
()
->
lockJoint
(
jointName
,
config
.
in
());
std
::
string
jointName
=
item
->
text
().
toStdString
();
std
::
string
lockName
=
"lock_"
+
jointName
;
hpp
::
floatSeq_var
config
=
plugin_
->
client
()
->
robot
()
->
getJointConfig
(
jointName
.
c_str
());
plugin_
->
client
()
->
problem
()
->
createLockedJoint
(
lockName
.
c_str
(),
jointName
.
c_str
(),
config
.
in
());
emit
constraintCreated
(
lockName
.
c_str
());
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment