Skip to content
Snippets Groups Projects

CCF: The CeTI Cobotic Framework

TODO the documentation does not represent the current state of the framework and needs to be updated!

This ROS package provides a connection between a ROS-based model and the CGV framework. The purpose of this connection is to use the CGV framework to select and move elements from a scene provided by ROS using an AR controller.

For the communication between the two components, messages encoded using Protocol Buffers (v3) are exchanged using NNG.

Since the package is under active development, it contains several demonstrators in varying development states. In particular, besides the main demonstrator it contains several tests of NNG communication patterns that can be used for internal and external testing.

Generating the ROS-Documentation

  • Source the workspace
    $ source devel/setup.bash
  • Generate the documentation
    $ rosdoc_lite `rospack find ccf`
  • You can view the generated files in you browser by opening the generated index.html
    xdg-open `rospack find ccf`/doc/html/index.html

Running the Tests

  1. Build the package (this is not done automatically by the following commands)
catkin build
  1. Build the tests
    catkin build --make-args tests
  2. Run the tests
    rostest -t ccf test_NodeUtil.test

CGV Dummy Controller Demonstrator

This demonstrator contains two mock-up nodes that can serve as stand-ins for future functional implementations.

  • dummy_cgv is a mock-up of the cgv framework. it connects to the ROS ccf and waits for it to send a scene. Once a Scene is received, it waits two seconds and then sends a selection of a random Box from the scene (if there is one). After another two seconds, the bin is selected.
  • dummy_ccf is a mock-up of the ros end of the connection, accepting connections from the CGV framework. When receiving a message on topic /ccf/send_scene, it sends a scene to the framework. It furthermore is able to receive object Selection messages (and currently simply prints a notification).

Running the Example

  • Checkout the project using git. Since the CMake build uses git submodules, do not remove the git information! It is not required to checkout the submodule manually, this is done using CMake.
  • Build the project.
  • Start ROS
    $ roscore
  • Start the dummy_cgv_controller and dummy_cgv nodes in two terminals. Both are in the ccf namespace.
    $ rosrun ccf dummy_cgv_controller
    Note that the dummy_cgv tries to connect to the dummy_cgv_controller, so as long as the latter is not running, warnings are logged.
    $ rosrun ccf dummy_cgv
  • Trigger a transmission by publishing a string message to /ccf/send_scene.
    $ rostopic pub -1 /ccf/send_scene std_msgs/String "Some Message"
    The dummy_cgv node command will show the received scene. With a delay of two seconds, selections of a box and a bin will be logged by the dummy_cgv_controller

Running the demo

Configuration

  • configure the scene (not required when using the dummy controller):
    rostopic pub -1 /scene_config std_msgs/String "\"$(roscat ccf config_scene.yaml)\""

Execution

  • pick an object by id: rostopic pub -1 /robot/pick std_msgs/String "objectRed1"
  • place a picked object into a bin by id: rostopic pub -1 /robot/place std_msgs/String "binRed"

Connect to the CGV framework

  • CASE 1 The robot controller is not accepting connections, but the AR server is.
    • ensure a SSH server is running on the AR server
    • On the robot controller, connect to it
      ssh stadmin@141.76.65.71 -R 6576:localhost:6576

Using the Example with Docker

The following instructions can be used to run either the cgv dummy or the ros-connector dummy from within a docker container. All commands involving docker must be run as root or as a user with docker privileges.

  • Create a container called ccf
    $ docker build --tag ccf .
  • Run the container, exposing the port the receiver listens on, 6576.
    $ docker run -it -p 6576:6576 ros4ceti/cgv:latest roslaunch ccf dummy_cgv_controller.launch
    Run the CGV dummy:
    $ docker run -it --network host ros4ceti/cgv:latest roslaunch ccf dummy_cgv.launch
  • The dummy_cgv_controller now is available and awaits NNG messages at localhost:6576.