Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wolf_ros_laser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
mobile_robotics
wolf_projects
wolf_ros
wolf_ros_laser
Commits
21ec9ffa
Commit
21ec9ffa
authored
5 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
new subscribers constructors with param server
parent
fa2df1ce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!4
new release
,
!3
New release
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/subscriber_laser2d.h
+5
-4
5 additions, 4 deletions
include/subscriber_laser2d.h
src/subscriber_laser2d.cpp
+4
-5
4 additions, 5 deletions
src/subscriber_laser2d.cpp
with
9 additions
and
9 deletions
include/subscriber_laser2d.h
+
5
−
4
View file @
21ec9ffa
...
@@ -46,13 +46,14 @@ class SubscriberLaser2d : public Subscriber
...
@@ -46,13 +46,14 @@ class SubscriberLaser2d : public Subscriber
public:
public:
// Constructor
// Constructor
SubscriberLaser2d
(
const
SensorBasePtr
&
sensor_ptr
);
SubscriberLaser2d
(
const
std
::
string
&
_unique_name
,
const
ParamsServer
&
_server
,
const
SensorBasePtr
_sensor_ptr
);
WOLF_SUBSCRIBER_CREATE
(
SubscriberLaser2d
);
virtual
void
initSubscriber
(
ros
::
NodeHandle
&
nh
,
const
std
::
string
&
topic
);
void
initSubscriber
(
ros
::
NodeHandle
&
nh
,
const
std
::
string
&
topic
)
override
;
void
callback
(
const
sensor_msgs
::
LaserScan
::
ConstPtr
&
msg
);
void
callback
(
const
sensor_msgs
::
LaserScan
::
ConstPtr
&
msg
);
static
std
::
shared_ptr
<
Subscriber
>
create
(
const
std
::
string
&
_unique_name
,
const
ParamsServer
&
_params
,
const
SensorBasePtr
_sensor_ptr
);
};
};
WOLF_REGISTER_SUBSCRIBER
(
SubscriberLaser2d
)
WOLF_REGISTER_SUBSCRIBER
(
SubscriberLaser2d
)
...
...
This diff is collapsed.
Click to expand it.
src/subscriber_laser2d.cpp
+
4
−
5
View file @
21ec9ffa
...
@@ -4,7 +4,10 @@
...
@@ -4,7 +4,10 @@
namespace
wolf
namespace
wolf
{
{
// Constructor
// Constructor
SubscriberLaser2d
::
SubscriberLaser2d
(
const
SensorBasePtr
&
sensor_ptr
)
:
Subscriber
(
sensor_ptr
)
SubscriberLaser2d
::
SubscriberLaser2d
(
const
std
::
string
&
_unique_name
,
const
ParamsServer
&
_server
,
const
SensorBasePtr
_sensor_ptr
)
:
Subscriber
(
_unique_name
,
_server
,
_sensor_ptr
)
{
{
laser_intrinsics_set_
=
false
;
laser_intrinsics_set_
=
false
;
}
}
...
@@ -86,8 +89,4 @@ void SubscriberLaser2d::callback(const sensor_msgs::LaserScan::ConstPtr& msg)
...
@@ -86,8 +89,4 @@ void SubscriberLaser2d::callback(const sensor_msgs::LaserScan::ConstPtr& msg)
// }
// }
}
}
std
::
shared_ptr
<
Subscriber
>
SubscriberLaser2d
::
create
(
const
std
::
string
&
_unique_name
,
const
ParamsServer
&
_params
,
const
SensorBasePtr
_sensor_ptr
)
{
return
std
::
make_shared
<
SubscriberLaser2d
>
(
_sensor_ptr
);
}
}
}
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