Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
RobotAPI
Commits
df1c25b0
Commit
df1c25b0
authored
6 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Forward declaration, class doc
parent
7ebd7e37
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/libraries/core/DebugDrawerTopic.cpp
+1
-0
1 addition, 0 deletions
source/RobotAPI/libraries/core/DebugDrawerTopic.cpp
source/RobotAPI/libraries/core/DebugDrawerTopic.h
+36
-16
36 additions, 16 deletions
source/RobotAPI/libraries/core/DebugDrawerTopic.h
with
37 additions
and
16 deletions
source/RobotAPI/libraries/core/DebugDrawerTopic.cpp
+
1
−
0
View file @
df1c25b0
...
...
@@ -2,6 +2,7 @@
#include
<VirtualRobot/math/Helpers.h>
#include
<ArmarXCore/core/ManagedIceObject.h>
#include
"Pose.h"
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/core/DebugDrawerTopic.h
+
36
−
16
View file @
df1c25b0
...
...
@@ -2,18 +2,38 @@
#include
<Eigen/Geometry>
#include
<ArmarXCore/core/ManagedIceObject.h>
#include
<RobotAPI/interface/visualization/DebugDrawerInterface.h>
namespace
armarx
{
// forward declaration
class
ManagedIceObject
;
/**
* @brief The DebugDrawerTopic wraps a DebugDrawerInterfacePrx and
* provides a more useful interface than the Ice interface.
*
* The methods by DebugDrawerTopic take "raw" types, such as Eigen or PCL
* types, and takes care of conversion to Ice variants or data structures.
* In addition, it provides useful overloads for different use cases.
*
* Methods arguments are ordered from specific to general. That is, common
* arguments such as VisuID and color always come last. Less common
* parameters (e.g. width of arrow/line), come before them. The first
* arguments are those specific to the respective function.
* (Added methods should follow this pattern.)
*
* All methods check whether the internal topic proxy is set, and do
* nothing if it is not set. To disable visualization by this classs
* completely, just do not set the topic.
*
*/
class
DebugDrawerTopic
{
public:
struct
VisuID
{
/// Construct with empty name and layer name "debug".
...
...
@@ -22,25 +42,25 @@ namespace armarx
VisuID
(
const
std
::
string
&
name
);
/// Construct with given layer and name.
VisuID
(
const
std
::
string
&
layer
,
const
std
::
string
&
name
);
std
::
string
layer
=
"debug"
;
std
::
string
name
;
};
public
:
/// Construct without topic.
DebugDrawerTopic
();
/// Construct with given topic.
DebugDrawerTopic
(
const
DebugDrawerInterfacePrx
&
topic
);
/// Set the topic.
void
setTopic
(
const
DebugDrawerInterfacePrx
&
topic
);
/// Set the topic.
DebugDrawerInterfacePrx
getTopic
()
const
;
/// Call offeringTopic([topicName]) on the given component.
void
offeringTopic
(
ManagedIceObject
&
component
)
const
;
/// Get the topic by calling getTopic([topicName]) on the given component.
...
...
@@ -50,27 +70,27 @@ namespace armarx
/// Set the scale for pose visualization.
/// This value will be used for all successive calls to drawPose().
void
setPoseScale
(
float
scale
);
void
drawPose
(
const
Eigen
::
Matrix4f
&
pose
,
const
VisuID
&
id
);
void
drawPose
(
const
Eigen
::
Vector3f
&
pos
,
const
Eigen
::
Quaternionf
&
ori
,
const
VisuID
&
id
);
void
drawArrow
(
const
Eigen
::
Vector3f
&
position
,
const
Eigen
::
Vector3f
&
direction
,
float
length
,
float
width
,
const
DrawColor
&
color
,
const
VisuID
&
id
);
void
drawArrowFromTo
(
const
Eigen
::
Vector3f
&
from
,
const
Eigen
::
Vector3f
&
to
,
float
width
,
const
DrawColor
&
color
,
const
VisuID
&
id
);
private
:
static
const
std
::
string
TOPIC_NAME
;
DebugDrawerInterfacePrx
topic
=
nullptr
;
float
poseScale
=
1
;
};
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment