-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added option to load cloud through "load_pcd" service #381
Conversation
[96] FAILED on melodic
[96] FAILED on noetic
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you temporary change
Lines 3 to 4 in f42ffe9
uri: https://github.com/at-wat/mcl_3dl_msgs.git | |
version: master |
src/mcl_3dl.cpp
Outdated
} | ||
|
||
pcl_conversions::toPCL(ros::Time::now(), pc_tmp->header.stamp); | ||
pc_tmp->header.frame_id = req.frame_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frame_id
of pc_map_
should be params_.frame_ids_["map"]
.
Possible options are
- transform the pcd data to
params_.frame_ids_["map"]
ifreq.frame_id
is not equal toparams_.frame_ids_["map"]
- remove
frame_id
frommcl_3dl_msgs::LoadPCD::Request
and assume that the frame of the pcd file isparams_.frame_ids_["map"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one. I changed it and removed frame_id
from the request.
.rosinstall
Outdated
@@ -1,4 +1,4 @@ | |||
- git: | |||
local-name: mcl_3dl_msgs | |||
uri: https://github.com/at-wat/mcl_3dl_msgs.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uri: https://github.com/at-wat/mcl_3dl_msgs.git | |
uri: https://github.com/remco-r/mcl_3dl_msgs.git |
[98] PASSED on melodicAll tests passed
[98] PASSED on noeticAll tests passed
|
src/mcl_3dl.cpp
Outdated
srv_load_pcd_ = mcl_3dl_compat::advertiseService( | ||
nh_, "load_pcd", | ||
pnh_, "load_pcd", &MCL3dlNode::cbLoadPCD, this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New service can be advertised by normal nh_.advertiseService
.
mcl_3dl_compat::advertiseService
is for the compatibility with the earlier version of mcl_3dl.
Codecov Report
@@ Coverage Diff @@
## master #381 +/- ##
==========================================
- Coverage 94.19% 93.56% -0.64%
==========================================
Files 32 32
Lines 1896 1912 +16
==========================================
+ Hits 1786 1789 +3
- Misses 110 123 +13
Continue to review full report at Codecov.
|
[101] PASSED on melodicAll tests passed
[101] PASSED on noeticAll tests passed
|
[102] PASSED on noeticAll tests passed
|
[102] PASSED on melodicAll tests passed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM:+1:
Please revert .rosinstall
then I'll merge it.
I have rebased on master, and removed the .rosinstall commit |
[103] PASSED on noeticAll tests passed
|
[103] PASSED on melodicAll tests passed
|
This PR is accompanied by a service definition in mcl_3dl_msgs: at-wat/mcl_3dl_msgs#30
The map to localize in was previously loaded with a sensor_msgs::PointCloud2 topic. It was not guaranteed that the map was actually loaded with a single publish on the topic. Also it was overkill if you had a pcd you wanted to localize in, because you would have to convert it first to a PointCloud2, then publish it, and then it would be converted in mcl_3dl to a PCL cloud.
This PR implements loading a pcd file by file path, directly into mcl_3dl.