From e31ffac08d8acc8d8757302304c179218a75010a Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Tue, 5 Feb 2019 13:40:27 +0900 Subject: [PATCH 1/3] enable to run on melodic --- include/create/serial.h | 3 ++- src/serial.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/create/serial.h b/include/create/serial.h index 9dd9bc3..28b5f69 100644 --- a/include/create/serial.h +++ b/include/create/serial.h @@ -40,13 +40,14 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include "create/data.h" #include "create/types.h" #include "create/util.h" namespace create { - class Serial { + class Serial : public boost::enable_shared_from_this { protected: boost::asio::io_service io; diff --git a/src/serial.cpp b/src/serial.cpp index 3894b9e..12876aa 100644 --- a/src/serial.cpp +++ b/src/serial.cpp @@ -72,7 +72,7 @@ namespace create { // Start continuously reading one byte at a time boost::asio::async_read(port, boost::asio::buffer(&byteRead, 1), - boost::bind(&Serial::onData, this, _1, _2)); + boost::bind(&Serial::onData, shared_from_this(), _1, _2)); ioThread = boost::thread(boost::bind(&boost::asio::io_service::run, &io)); @@ -145,7 +145,7 @@ namespace create { // Read the next byte boost::asio::async_read(port, boost::asio::buffer(&byteRead, 1), - boost::bind(&Serial::onData, this, _1, _2)); + boost::bind(&Serial::onData, shared_from_this(), _1, _2)); } bool Serial::send(const uint8_t* bytes, unsigned int numBytes) { From 9708806acc22327fb391453060a9290a43b62550 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Sat, 2 Mar 2019 19:42:34 +0900 Subject: [PATCH 2/3] update package.xml --- package.xml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/package.xml b/package.xml index 7c3e2a9..cdfe8df 100644 --- a/package.xml +++ b/package.xml @@ -1,10 +1,11 @@ - + libcreate - 1.6.1 + 2.0.0 C++ library for interfacing with iRobot's Create 1 and Create 2 Jacob Perron + Yutaka Kondo BSD @@ -14,17 +15,15 @@ Jacob Perron - cmake + ament_cmake boost - catkin - doxygen gtest - cmake + ament_cmake From e2c0e5030a89100ed3c951a0b80f1564bb29349c Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Sat, 2 Mar 2019 19:44:40 +0900 Subject: [PATCH 3/3] update readme --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index badfb1a..c4e0b1c 100644 --- a/README.md +++ b/README.md @@ -51,14 +51,13 @@ Note, the examples found in the "examples" directory are built with the library. cmake .. make -j -#### catkin #### +#### colcon #### mkdir -p create_ws/src - cd create_ws - catkin init - cd src + cd create_ws/src git clone https://github.com/AutonomyLab/libcreate.git - catkin build + cd .. + colcon build ## Running Tests ##