Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
crosbot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Crosbot
crosbot
Commits
e75a275a
Commit
e75a275a
authored
8 years ago
by
Timothy Wiley
Browse files
Options
Downloads
Patches
Plain Diff
Command lister may choose to ignore global namespace
parent
ac914fbb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
crosbot/include/crosbot/controls/command.hpp
+6
-3
6 additions, 3 deletions
crosbot/include/crosbot/controls/command.hpp
with
6 additions
and
3 deletions
crosbot/include/crosbot/controls/command.hpp
+
6
−
3
View file @
e75a275a
...
...
@@ -43,9 +43,10 @@ private:
bool
send
;
bool
receive
;
bool
listenGlobal
;
// Listen to commands on global namespace
void
_callback_receivedCommand
(
const
crosbot_msgs
::
ControlCommandPtr
command
)
{
if
(
command
->
cmd_namespace
==
""
||
if
(
(
listenGlobal
&&
command
->
cmd_namespace
==
""
)
||
command
->
cmd_namespace
==
nspace
)
{
callback
->
callback_receivedCommand
(
command
);
}
...
...
@@ -82,11 +83,13 @@ public:
*/
CrosbotCommand
(
crosbot_msgs
::
ControlCommand
::
_cmd_namespace_type
nspace
=
""
,
bool
send
=
false
,
CrosbotCommandCallbackPtr
callback
=
NULL
)
:
CrosbotCommandCallbackPtr
callback
=
NULL
,
bool
listenGlobal
=
true
)
:
send
(
send
),
receive
(
false
),
nspace
(
nspace
),
callback
(
callback
)
callback
(
callback
),
listenGlobal
(
listenGlobal
)
{
// Node handle with "root" namespace
ros
::
NodeHandle
nh
(
""
);
...
...
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