[Documentation] [TitleIndex] [WordIndex

Overview

The goal here is to generate headers and modules for your custom messages. These, with the sdk, will allow you to use ros comms to its full extent as your inter-process and network communications transport .

In this tutorial we will:

Preparation

Dependencies

Much of these are similar to what is necessary for the Build Environment.

WinRos Build Script

> mkdir C:\work
> cd C:\work
> wget --no-check-certificate https://raw.github.com/stonier/win_ros/master/msvc/msvc_sdk/scripts/fuerte/winros.bat

Check that the variables in C:\work\winros.bat are appropriate (defaults should work). It is also a good idea to look inside to see what is actually going on.

Generate Official Comms

> cd C:\work
> winros comms download
> winros comms configure
> winros comms build

The script is configured to install the generated c++ headers and python modules to C:\opt\roscomms\fuerte. If you simply wish to install elsewhere (e.g. on top of the sdk), edit the COMMS_INSTALL_PREFIX variable indicated in the top of the winros.bat script.

> winros comms install

Create Your Own Comms Stack/Packages

Create

Let's create a stack and package for your own custom msg/srv files.

> cd C:\work\comms
> roscreate-stack custom_comms std_msgs common_msgs
> cd custom_comms
> roscreate-comms-pkg dude_comms

The script automatically sets up a simple msg/srv (Dude.msg, HelloDude.srv) in dude_comms.

Finally, edit C:\work\comms\custom_comms\CMakeLists.txt and tell it to pick up the dude_comms package. Uncomment the subdirectory block and edit it - it should look like this:

foreach(subdir
    dude_comms
    )
  add_subdirectory(${subdir})
endforeach()

Generate

You can delete the build directory and start over using the winros.bat helper, or more quickly, just drop into the build directory and update the cmake:

> cd C:\work\build_comms
> cmake .
> cd custom_comms/dude_comms
> nmake
> nmake install

Use Your Own Repositories

You'll want to put your code into a repository and drop that in instead of creating a stack like we did above. You can use rosws to do this, or you can extend the rosinstaller that was used by winros.bat. If you look at the top of the script, you can see the rosinstaller url that was used to download the comms sources (COMMS_ROSINSTALL_STABLE_URL). Simply download that one:

> wget --no-check-certificate https://raw.github.com/stonier/win_ros/master/msvc_fuerte_comms.rosinstall

Add your own repository to the end of the list and then change the COMMS_ROSINSTALL_STABLE_URL at the top of winros.bat to utilise your own rosinstall file. You can then proceed as we did for the official sources:

> winros comms download
> winros comms configure
> winros comms build
> winros comms install

2024-10-05 16:58