Skip to content

Commit

Permalink
added msg package for TB3
Browse files Browse the repository at this point in the history
  • Loading branch information
robotpilot committed Apr 24, 2017
1 parent 64ac3ad commit cb985e3
Show file tree
Hide file tree
Showing 10 changed files with 212 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
Expand All @@ -27,3 +26,35 @@
*.exe
*.out
*.app

# user setting
*.*~
*.bak
.svn
.tags
.tags_sorted_by_file
*.cfgc
*.txt.user*
*-build/
cpp/
bin/
build/
msg_gen/
srv_gen/
docs/
lib/
cmake_install.cmake
Makefile
CMakeFiles/
assets/
gen/
build.xml
lint.xml
local.properties
proguard-project.txt
build-*/
*.autosave
*.pyc
*.dat
*.txt.user
*.gch
63 changes: 63 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
################################################################################
# CMake
################################################################################
cmake_minimum_required(VERSION 2.8.3)
project(turtlebot3_msgs)

################################################################################
# Packages
################################################################################
find_package(catkin REQUIRED COMPONENTS
message_generation
std_msgs
sensor_msgs
std_srvs
)

################################################################################
# Declare ROS messages, services and actions
################################################################################
add_message_files(
FILES
SensorState.msg
MotorPower.msg
VersionInfo.msg
PanoramaImg.msg
)

add_service_files(
DIRECTORY srv
FILES
TakePanorama.srv
SetFollowState.srv
)


generate_messages(
DEPENDENCIES
std_msgs
sensor_msgs
)

################################################################################
# Declare ROS dynamic reconfigure parameters
################################################################################

################################################################################
# Catkin specific configuration
################################################################################
catkin_package(
CATKIN_DEPENDS std_msgs sensor_msgs std_srvs message_runtime
)

################################################################################
# Build
################################################################################

################################################################################
# Install
################################################################################

################################################################################
# Test
################################################################################
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<img src="https://raw.githubusercontent.com/ROBOTIS-GIT/ROBOTIS-Documents/master/wiki-images/Turtlebot3/Turtlebot3_logo.jpg" width="300">

# Turtlebot3

TurtleBot3 is a small, low cost, fully programmable, ROS­ based mobile robot. It is intended to be used for the purpose of education, research, product prototyping, and hobby application.

The goal of the TurtleBot3 is to drastically reduce the size and the price of the platform without sacrificing capability, functionality, and quality. Since the additional options, such as the chassis, the computers, and the sensors, are available, the TurtleBot3 can be customized in various ways. The TurtleBot3 is willing to be in the center of the maker movement by applying the latest technical advances of the SBC(Single­Board Computer), the Depth sensor, and the 3D printing.

# Documents

- http://turtlebot3.robotis.com/ (beta version)
7 changes: 7 additions & 0 deletions msg/MotorPower.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Turn on/off Dynamixels

# State
uint8 OFF = 0
uint8 ON = 1

uint8 state
8 changes: 8 additions & 0 deletions msg/PanoramaImg.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#Pano message
Header header
string pano_id
float64 latitude
float64 longitude
float64 heading #in degrees, compass heading
string geo_tag
sensor_msgs/Image image
32 changes: 32 additions & 0 deletions msg/SensorState.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
########################################
# CONSTANTS
########################################
# Bumper states (states are combined, when multiple bumpers are pressed)
uint8 BUMPER_RIGHT = 1
uint8 BUMPER_CENTER = 2
uint8 BUMPER_LEFT = 4

# Cliff sensor states (states are combined, when multiple cliff sensors are triggered)
uint8 CLIFF_RIGHT = 1
uint8 CLIFF_CENTER = 2
uint8 CLIFF_LEFT = 4

# Button states (only one button can be triggered at a time)
uint8 BUTTON0 = 1
uint8 BUTTON1 = 2
uint8 BUTTON2 = 4

# Motor errors
uint8 ERROR_LEFT_MOTOR = 1
uint8 ERROR_RIGHT_MOTOR = 2

########################################
# Messages
########################################
time stamp
uint8 bumper
uint8 cliff
uint8 button
int32 left_encoder # (-2,147,483,648 ~ 2,147,483,647)
int32 right_encoder # (-2,147,483,648 ~ 2,147,483,647)
float32 battery
3 changes: 3 additions & 0 deletions msg/VersionInfo.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
string hardware # <yyyy>.<mm>.<dd> : hardware version of Turtlebot3 (ex. 2017.05.23)
string firmware # <major>.<minor>.<patch> : firmware version of OpenCR
string software # <major>.<minor>.<patch> : software version of Turtlebot3 ROS packages
23 changes: 23 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<package>
<name>turtlebot3_msgs</name>
<version>0.1.2</version>
<description>
Message and service types: custom messages and services for TurtleBot3 packages
</description>
<license>Apache License 2.0</license>
<author email="[email protected]">Pyo</author>
<maintainer email="[email protected]">Pyo</maintainer>
<url type="bugtracker">https://github.com/ROBOTIS-GIT/turtlebot3/issues</url>
<url type="repository">https://github.com/ROBOTIS-GIT/turtlebot3</url>
<url type="website">http://wiki.ros.org/turtlebot3_msgs</url>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>std_msgs</build_depend>
<build_depend>std_srvs</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>message_generation</build_depend>
<run_depend>std_msgs</run_depend>
<run_depend>std_srvs</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>message_runtime</run_depend>
</package>
12 changes: 12 additions & 0 deletions srv/SetFollowState.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
uint8 STOPPED = 0
uint8 FOLLOW = 1

# Following running/stopped
uint8 state

---

uint8 OK = 0
uint8 ERROR = 1

uint8 result
21 changes: 21 additions & 0 deletions srv/TakePanorama.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# mode for taking the pictures
uint8 mode
# rotate, stop, snapshot, rotate, stop, snapshot, ...
uint8 SNAPANDROTATE=0
# keep rotating while taking snapshots
uint8 CONTINUOUS=1
# stop an ongoing panorama creation
uint8 STOP=2
# total angle of panorama picture
float32 pano_angle
# angle interval when creating the panorama picture in snap&rotate mode, time interval otherwise
float32 snap_interval
# rotating velocity
float32 rot_vel

---

uint8 status
uint8 STARTED=0
uint8 IN_PROGRESS=1
uint8 STOPPED=2

0 comments on commit cb985e3

Please sign in to comment.