This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <boost/thread.hpp> | |
using namespace std; | |
using boost::thread; | |
using boost::mutex; | |
using boost::shared_lock; | |
using boost::shared_mutex; | |
using boost::upgrade_lock; | |
using boost::upgrade_to_unique_lock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cassert> | |
#include <boost/asio.hpp> | |
#include <boost/thread.hpp> | |
constexpr int NTASK = 50; | |
int | |
main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 4 spaces to 2 spaces | |
%s;^\(\s\+\);\=repeat(' ', len(submatch(0))/2);g | |
// Tab to 2 spaces | |
:%s/\t/ /g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// schedule_read is called o start reading | |
void connection::connect() | |
{ | |
boost::asio::ip::tcp::resolver resolver(_io); | |
boost::asio::ip::tcp::resolver::query query(_hostname, std::to_string(_port)); | |
boost::asio::ip::tcp::resolver::iterator iterator = resolver.resolve(query); | |
boost::system::error_code ec; | |
boost::asio::connect(_socket, iterator, ec); | |
if (ec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Dynamic URDF Publisher | |
# | |
# This script monitors a URDF file and when changed will publish to /robot_description | |
# | |
# Requirements: | |
# Besides the standard Ros2 modules, Install watchdog module for listening | |
# to filesystem events: | |
# `pip3 install watchdog` | |
# |