dso icon indicating copy to clipboard operation
dso copied to clipboard

Include <ros/ros.h>

Open bjbraun opened this issue 6 years ago • 5 comments

Hi,

how is it possible to include ros? I have tried changing the cmake file and package file by including the following changes (I have used the cmake branch of Nikolaus Demmels Version of the DSO https://github.com/NikolausDemmel/dso/tree/cmake):

Cmake-File:

find_package(catkin REQUIRED COMPONENTS) find_package(roscpp) catkin_package(CATKIN_DEPENDS roscpp) include_directories( ${catkin_INCLUDE_DIRS} ) target_link_libraries(dso_dataset ${catkin_LIBRARIES} )

Package: <buildtool_depend>catkin</buildtool_depend> roscpp

It is building including these changes (using catkin build). However, if i then try to add "#include <ros/ros.h>" to any file, it says that it can't finde the file. My goal is it, to publish some values in the SampleOutputWrapper.

Everything else is working perfectly fine.

Thank you really much in advance for your help!

bjbraun avatar May 24 '18 14:05 bjbraun

You would like to use ros directly in the DSO package and not dso_ros?

You need to adapt the package.xml and CMakeLists.txt.

Best remove these lines: https://github.com/NikolausDemmel/dso/blob/5c77bcca3ca6b81abd6737f967f28442ec735317/package.xml#L18-L20

Also, in cmake lists you should do:

find_package(catkin REQUIRED COMPONENTS roscpp)

NikolausDemmel avatar May 25 '18 00:05 NikolausDemmel

Hi Nikolaus,

Thank you really much! It is working in this way.

Is there a better way that I can access the data in ros? I tried to use dso_ros, which is basically working. However, I was not able to get the data from for example publishKeyframes to the main.cpp of dso_ros so that I can publish them there.

bjbraun avatar May 25 '18 08:05 bjbraun

Is there a better way that I can access the data in ros? I tried to use dso_ros, which is basically working. However, I was not able to get the data from for example publishKeyframes to the main.cpp of dso_ros so that I can publish them there.

You are free to extend the output wrapper interface if it doesn't give you all the info you need. But I guess it is also fine to add ROS publishers directly to DSO if that makes your life easier, but that is less modular in the long run.

NikolausDemmel avatar May 26 '18 14:05 NikolausDemmel

hey @bjbraun , Can you share your SampleOutputWrapper file. I also want to publish data from there but I cant write publisher in it.

zeeshanhabibvirani avatar Aug 14 '20 11:08 zeeshanhabibvirani

Hello @bjbraun @NikolausDemmel

I am also trying to run dso directly with ros. I am able to compile my OutputWrapper although when I try to run the code I get an error that Couldn't find executable named dso_dataset below /home/xxx/catkin_ws/src/dso.

Can you please let me know the directory path from where you executed the rosrun command?

Thank you!

chapa17 avatar Nov 02 '21 08:11 chapa17