Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wolf_ros_node
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_node
Commits
28ac0c44
Commit
28ac0c44
authored
5 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
added different frame_id in publish pose
parent
fac204b8
No related branches found
No related tags found
2 merge requests
!11
new release
,
!10
new release
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+16
-1
16 additions, 1 deletion
CMakeLists.txt
src/publisher_pose.cpp
+3
-3
3 additions, 3 deletions
src/publisher_pose.cpp
with
19 additions
and
4 deletions
CMakeLists.txt
+
16
−
1
View file @
28ac0c44
...
@@ -14,6 +14,7 @@ find_package(catkin REQUIRED COMPONENTS
...
@@ -14,6 +14,7 @@ find_package(catkin REQUIRED COMPONENTS
sensor_msgs
sensor_msgs
std_msgs
std_msgs
tf
tf
tf_conversions
dynamic_reconfigure
dynamic_reconfigure
)
)
...
@@ -167,7 +168,21 @@ add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencfg)
...
@@ -167,7 +168,21 @@ add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencfg)
add_dependencies
(
visualizer
${
PROJECT_NAME
}
_gencfg
)
add_dependencies
(
visualizer
${
PROJECT_NAME
}
_gencfg
)
## Specify libraries to link a library or executable target against
## Specify libraries to link a library or executable target against
target_link_libraries
(
visualizer
${
wolf_LIBRARIES
}
)
target_link_libraries
(
subscriber_
${
PROJECT_NAME
}
${
catkin_LIBRARIES
}
${
CERES_LIBRARIES
}
${
wolf_LIBRARIES
}
yaml-cpp
dl
)
target_link_libraries
(
publisher_
${
PROJECT_NAME
}
${
catkin_LIBRARIES
}
${
CERES_LIBRARIES
}
${
wolf_LIBRARIES
}
yaml-cpp
dl
)
target_link_libraries
(
${
PROJECT_NAME
}
target_link_libraries
(
${
PROJECT_NAME
}
visualizer
visualizer
...
...
This diff is collapsed.
Click to expand it.
src/publisher_pose.cpp
+
3
−
3
View file @
28ac0c44
...
@@ -113,7 +113,7 @@ void PublisherPose::publishDerived()
...
@@ -113,7 +113,7 @@ void PublisherPose::publishDerived()
}
}
// Change frame
// Change frame
if
(
frame_id_
!=
map_frame_id_
)
if
(
frame_id_
!=
map_frame_id_
and
listenTf
()
)
{
{
p
=
t_frame_
+
q_frame_
*
p
;
p
=
t_frame_
+
q_frame_
*
p
;
q
=
q_frame_
*
q
;
q
=
q_frame_
*
q
;
...
@@ -154,9 +154,9 @@ void PublisherPose::publishPose(const geometry_msgs::Pose pose, const ros::Time&
...
@@ -154,9 +154,9 @@ void PublisherPose::publishPose(const geometry_msgs::Pose pose, const ros::Time&
bool
PublisherPose
::
listenTf
()
bool
PublisherPose
::
listenTf
()
{
{
tf
::
StampedTransform
T
;
tf
::
StampedTransform
T
;
if
(
tfl_
.
waitForTransform
(
map_
frame_id_
,
frame_id_
,
ros
::
Time
(
0
),
ros
::
Duration
(
0.01
))
)
if
(
tfl_
.
waitForTransform
(
frame_id_
,
map_
frame_id_
,
ros
::
Time
(
0
),
ros
::
Duration
(
0.01
))
)
{
{
tfl_
.
lookupTransform
(
map_
frame_id_
,
frame_id_
,
ros
::
Time
(
0
),
T
);
tfl_
.
lookupTransform
(
frame_id_
,
map_
frame_id_
,
ros
::
Time
(
0
),
T
);
Eigen
::
Matrix3d
R
;
Eigen
::
Matrix3d
R
;
tf
::
matrixTFToEigen
(
T
.
getBasis
(),
R
);
tf
::
matrixTFToEigen
(
T
.
getBasis
(),
R
);
...
...
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