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
- Build the package (this is not done automatically by the following commands)
catkin build
- Build the tests
catkin build --make-args tests
- 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 ROSccf
and waits for it to send a scene. Once aScene
is received, it waits two seconds and then sends a selection of a randomBox
from the scene (if there is one). After another two seconds, thebin
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 objectSelection
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
anddummy_cgv
nodes in two terminals. Both are in theccf
namespace.$ rosrun ccf dummy_cgv_controller
$ 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"
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 thedummy_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
$ 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
.