ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ros2 publisher for other program

asked 2019-05-11 13:41:51 -0600

tingwei gravatar image

I have another complex c++ program coding with VC6++ , and need to use ros2 publisher to publish the data out.

  1. Should I need to upgrade the code to VS2017 version since the ros2 using this version?
  2. There will be two exe file for my program and ros2 publisher, how do I link my program to ros2 publisher? by including? or I just add a new file inside my program for publisher
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-16 10:51:05 -0600

Dirk Thomas gravatar image

The ROS 2 publisher executable is only an example to demonstrate how to use API to publish messages. If you want to add a publisher to your program you need to add similar code to your software to do the publishing. As a consequence you will need to link against ROS 2.

You can either use the precompiled binaries (VS 2015/2017/2019 should be binary compatible) or build ROS 2 from source. I would expect that VC6++ won't cut it since the ROS 2 code uses fairly recent C++14 features which that version of VS will likely be unable to parse / compile.

edit flag offensive delete link more

Question Tools



Asked: 2019-05-11 13:41:51 -0600

Seen: 146 times

Last updated: May 16 '19