Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic_graph_bridge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guilhem Saurel
dynamic_graph_bridge
Commits
2542b861
Commit
2542b861
authored
13 years ago
by
Florent Lamiraux
Committed by
Florent Lamiraux florent@laas.fr
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Document class RosExport and implement method list.
parent
66440792
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ros_export.cpp
+39
-5
39 additions, 5 deletions
src/ros_export.cpp
src/ros_export.hh
+1
-1
1 addition, 1 deletion
src/ros_export.hh
with
40 additions
and
6 deletions
src/ros_export.cpp
+
39
−
5
View file @
2542b861
...
@@ -49,8 +49,7 @@ namespace dynamicgraph
...
@@ -49,8 +49,7 @@ namespace dynamicgraph
{
{
RosExport
&
entity
=
RosExport
&
entity
=
static_cast
<
RosExport
&>
(
owner
());
static_cast
<
RosExport
&>
(
owner
());
entity
.
list
();
return
Value
(
entity
.
list
());
return
Value
();
}
}
Add
::
Add
Add
::
Add
...
@@ -122,16 +121,45 @@ namespace dynamicgraph
...
@@ -122,16 +121,45 @@ namespace dynamicgraph
nh_
(
rosInit
(
true
)),
nh_
(
rosInit
(
true
)),
bindedSignal_
()
bindedSignal_
()
{
{
std
::
string
docstring
;
std
::
string
docstring
=
"
\n
"
" Add a signal reading data from a ROS topic
\n
"
"
\n
"
" Input:
\n
"
" - type: string among ['double', 'matrix', 'vector', 'vector3',
\n
"
" 'vector3Stamped', 'matrixHomo', 'matrixHomoStamped',
\n
"
" 'twist', 'twistStamped'],
\n
"
" - signal: the signal name in dynamic-graph,
\n
"
" - topic: the topic name in ROS.
\n
"
"
\n
"
;
addCommand
(
"add"
,
addCommand
(
"add"
,
new
command
::
rosExport
::
Add
new
command
::
rosExport
::
Add
(
*
this
,
docstring
));
(
*
this
,
docstring
));
docstring
=
"
\n
"
" Remove a signal reading data from a ROS topic
\n
"
"
\n
"
" Input:
\n
"
" - name of the signal to remove (see method list for the list of signals).
\n
"
"
\n
"
;
addCommand
(
"rm"
,
addCommand
(
"rm"
,
new
command
::
rosExport
::
Rm
new
command
::
rosExport
::
Rm
(
*
this
,
docstring
));
(
*
this
,
docstring
));
docstring
=
"
\n
"
" Remove all signals reading data from a ROS topic
\n
"
"
\n
"
" No input:
\n
"
"
\n
"
;
addCommand
(
"clear"
,
addCommand
(
"clear"
,
new
command
::
rosExport
::
Clear
new
command
::
rosExport
::
Clear
(
*
this
,
docstring
));
(
*
this
,
docstring
));
docstring
=
"
\n
"
" List signals reading data from a ROS topic
\n
"
"
\n
"
" No input:
\n
"
"
\n
"
;
addCommand
(
"list"
,
addCommand
(
"list"
,
new
command
::
rosExport
::
List
new
command
::
rosExport
::
List
(
*
this
,
docstring
));
(
*
this
,
docstring
));
...
@@ -150,9 +178,15 @@ namespace dynamicgraph
...
@@ -150,9 +178,15 @@ namespace dynamicgraph
bindedSignal_
.
erase
(
signal
);
bindedSignal_
.
erase
(
signal
);
}
}
void
RosExport
::
list
()
std
::
string
RosExport
::
list
()
{
{
std
::
cout
<<
CLASS_NAME
<<
std
::
endl
;
std
::
string
result
(
"["
);
for
(
std
::
map
<
std
::
string
,
bindedSignal_t
>::
const_iterator
it
=
bindedSignal_
.
begin
();
it
!=
bindedSignal_
.
end
();
it
++
)
{
result
+=
"'"
+
it
->
first
+
"',"
;
}
result
+=
"]"
;
return
result
;
}
}
void
RosExport
::
clear
()
void
RosExport
::
clear
()
...
...
This diff is collapsed.
Click to expand it.
src/ros_export.hh
+
1
−
1
View file @
2542b861
...
@@ -69,7 +69,7 @@ namespace dynamicgraph
...
@@ -69,7 +69,7 @@ namespace dynamicgraph
void
add
(
const
std
::
string
&
signal
,
const
std
::
string
&
topic
);
void
add
(
const
std
::
string
&
signal
,
const
std
::
string
&
topic
);
void
rm
(
const
std
::
string
&
signal
);
void
rm
(
const
std
::
string
&
signal
);
void
list
();
std
::
string
list
();
void
clear
();
void
clear
();
template
<
typename
T
>
template
<
typename
T
>
...
...
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