Robotics StackExchange | Archived questions

ros2 publisher for other program

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

Asked by tingwei on 2019-05-11 13:41:51 UTC

Comments

Answers

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.

Asked by Dirk Thomas on 2019-05-16 10:51:05 UTC

Comments