Skip to content

Commit

Permalink
Add ID to RobotCommand, add header to RobotState
Browse files Browse the repository at this point in the history
- Some robots require DO commands to be tagged with a unique ID. Add id
  field and information about this field to the README.
- RobotState now has a header (will make logs of RobotState messages
  better, and will make pulling these messages out of rosbags easier)
- Increase version to 2.0.0
  • Loading branch information
jakory committed Jun 9, 2016
1 parent 61bb3b8 commit 0959dd2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@ robots.

## RobotCommand

The RobotCommand message definition includes constants for the different
commands that can be sent to a robot. Some commands must be accompanied by a
set of properties, such as a string containing text for the robot to say and
actions/behaviors for the robot to do.
The RobotCommand message definition includes a standard ROS message header and
the command to send. Some commands, such as DO, must be accompanied by a set of
properties, such as a string containing text for the robot to say and
actions/behaviors for the robot to do.

For some robots, DO commands must be also tagged with a unique ID, which should
be put in the "id" field. Note that RobotCommand messages do not check nor
ensure that anything placed in the "id" field is in fact unique.

If a command does not require properties or an ID, set these fields as empty strings.

A list of constants is included for the different commands
that can be sent to a robot. These are:

- 0 SLEEP
- no properties (properties = null)
- no properties (properties = empty string)

- 1 WAKEUP
- no properties
Expand All @@ -21,6 +30,7 @@ actions/behaviors for the robot to do.
the robot to do before, during, or after speaking (or instead of
speaking)


### Details about the DO command

The exact format of this command's argument is yet to be determined, but may be
Expand Down
6 changes: 5 additions & 1 deletion msg/RobotCommand.msg
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ Header header
# which command will be sent
int8 command

# some robots require DO commands to be tagged with a unique ID
# leave empty if no unique ID is needed
string id

# properties of command, such as:
# string containing speech to play and actions to do
# null if no extra properties needed
# empty if no extra properties needed
string properties

# Commands
Expand Down
1 change: 1 addition & 0 deletions msg/RobotState.msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Message for receiving information about the robot's status
Header header

# True when the robot is currently performing an animation or behavior
bool doing_action
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package>
<name>sar_robot_command_msgs</name>
<version>0.1.0</version>
<version>2.0.0</version>
<description>Command messages for telling SAR robots what to do</description>

<maintainer email="[email protected]">jakory</maintainer>
Expand Down

0 comments on commit 0959dd2

Please sign in to comment.