0
$\begingroup$

Rosanswers logo

Hi,

I recently discovered octomap and was able to run mapping with octomap_server. But my question is how to start implementing this in my own project. I mean... is there some way to improve or extend this project since I don't have access to source code (or do I, I haven't really understood ROS's build system yet)?

For example, when running octomap_mapping.launch, map is generated based on point cloud that I send to given topic. Is there way to modify this to accept multiple sensors from multiple robots and then fuse whole map? What I've read in their article, octomap should be prepared to do this.

Is there for example way to override ROS octomap with and use that and modify it in some way? Because I plan to try this also outside ROS so trying to disconnect it could be very useful in long run.

Sorry, but I basically have no idea how to start using this amazing tool properly.

Thanks a lot for any advice.


Originally posted by l4ncelot on ROS Answers with karma: 826 on 2016-01-18

Post score: 2


Original comments

Comment by lucasw on 2016-01-18:
Can you publish all the pointclouds onto whatever topic octomap is listening to? The headers ought to distinguish them so octomap doesn't get confused.

Comment by lucasw on 2016-01-18:
It would be neat if remap could be used as many times as desired to have a node listen to multiple topics in one subscribe... or can it already?

Comment by l4ncelot on 2016-01-18:
Well it kind of does. When I publish pointclouds from different sensors to that topic, it merges them, but it takes a while. I think there is an issue with that idea of multiple publishers, because subscriber just get some message and don't care where it came from.

Comment by Eyshika on 2017-09-16:
When you launched octomap_mapping does it display some output ? Since, i just see it's running fine but nothing as output.

Comment by trunc8 on 2020-10-28:
@Eyshika, in the launch file, you must modify the value of the "frame_id" (possibly to "odom") and the remap for "cloud_in" (usually to="/camera/depth/points") based on your active topics.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

The code is on https://github.com/OctoMap, you ought to be able to put it and build it in your catkin work space and it will override octomap packages installed as binaries elsewhere.


Originally posted by lucasw with karma: 8729 on 2016-01-18

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by l4ncelot on 2016-01-18:
Ah, I didn't know that buy building project in workspace does override other binaries. Thank you.

Comment by lucasw on 2016-01-18:
I haven't tried it the other way but it may only work like that if you source your personal catkin workspace after sourcing /opt/ros/.../setup.bash. Trying out roscd octomap_server will show which one has precedence.

Comment by l4ncelot on 2016-01-18:
But what happens when you source /otp/ros/../setup.bash and also your personal workspace? How does ROS determine which one to use?

Comment by lucasw on 2016-01-18:
The order determines it: source /opt/ros/jade/setup.bash; source ~/catkin_ws/devel/setup.bash - ought to have the devel space (the latter one) take precedence over the official jade versions (which went first).

Comment by l4ncelot on 2016-01-18:
So having multiple sources in .bashrc is redundant then?

Comment by lucasw on 2016-01-18:
No, the jade setup.bash gives me everything installed with apt-get, and my own workspace is for all of my projects or non-apt-gettable stuff I need from github. In the case where a same named package exists in both, the last one sourced is used... (I should test that though)

Comment by l4ncelot on 2016-01-18:
Now I can understand that. Thank you very much.

Comment by dornhege on 2016-01-19:
This is incorrect. Only the latest source counts. All sources before are irrelevant and completely replaced. The sourcing order at build time is the one that decides what overlays what. So, the first source is redundant. You could have the catkin_ws build with indigo and it would be on indigo.

Comment by lucasw on 2016-01-19:
Running the experiment now I see that the ~/catkin_ws/devel/setup.bash does everything jade/setup.bash does in addition to adding the workspace to the package path, and a second ws would clobber the first. The source jade setup.bash was necessary to bootstrap to build workspace to begin with..

Comment by lucasw on 2016-01-19:
...or if devel is deleted and a new terminal is launched (assuming the source was in .bashrc), or it's convenient to be able to comment out the ~/catkin_ws source while leaving the formerly redundant /opt/ros...setup.bash so ros still works if another terminal is launched.

$\endgroup$
0
$\begingroup$

Rosanswers logo

You do get the source code. Just google for octomap, you should find the page + github repository. ROS currently uses octomap as a separate cmake package with only ROS wrapper packages, so it should be easy to extract this for your project.

For the multiple robots part, your idea is correct. Just give octomap correctly aligned point clouds and they should all be merged. For the topic remapping you'll probably need some kind of relay node. I don't think multiple remaps is possible.


Originally posted by dornhege with karma: 31395 on 2016-01-18

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by l4ncelot on 2016-01-18:
About that relay node. Is there some kind of sync for publishers? e.g. when I want to publish data from 2 sensors into 1 topic and want them to publish messages one by one and not just everything at a time?

Comment by dornhege on 2016-01-19:
I don't understand what you mean, but any synchronization should happen from the time stamps in the message headers.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.