User Tools

Site Tools


openag_brain:ros

openag_brain runs on ROS (Robot Operating System), an open source robotics system that is used in many commercial robots.

  • The current version of openag_brain uses ROS Indigo.
  • Detailed ROS documentation can be found on the ROS Wiki

Workspaces

ROS has a concept called workspaces (see http://wiki.ros.org/catkin/Tutorials/using_a_workspace). Before working with a ROS project, you have to activate its workspace. The default OpenAg workspace is located in ~/catkin_ws/. To activate it, run:

source ~/catkin_ws/devel/setup.bash

(This also works within the openag_brain Docker container. See docker for more.)

Once you activate the workspace, you can interact with ROS.

Topics

Topics are the core concept of ROS. They're named channels over which many different scripts and processes can communicate.

openag_brain uses ROS topics to tie together sensors, actuators and controllers into closed feedback loops.

To list available ROS topics:

 rostopic list

To log output from a ROS topic:

 rostopic echo <topic name>

Raw Data CSV Output for Experiments

When running experiments, it can be convenient to log data from a topic and export it as a csv. An easy way to do this is with a rosbag subset. Creating a rosbag will typically log data from all the topics unless you specify a subset of topic(s). To create this subset log, make a new directory and start a rosbag subset when you want to start logging data.

mkdir ~/bagfiles
cd ~/bagfiles
rosbag record -O subset /topic

When the experiment ends and you want to stop logging data, simply exit with:

ctrl + c

The data in the rosbag subset does not default to a .csv format so you can quickly convert it with the following command.

rostopic echo -b subset.bag -p /topic

More

To learn more about ROS, check out the ROS wiki.

openag_brain/ros.txt · Last modified: 2017/01/10 19:21 by 18.7.62.31