Gentoo 的 Minimal Install CD 每周都会自动构建一个版本,服务器一般使用最新的 x86_64 版本。 国内的镜像下载地址是:
This file contains hidden or 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
// Source: https://stackoverflow.com/a/48368508/17132546 | |
// Entry template | |
// extract the lambda's operaor() function signature | |
template <class F, class T=F> | |
struct lambda_traits: lambda_traits<decltype(&std::remove_reference<F>::type::operator()), F> | |
{}; | |
// For mutable lambda, See https://en.cppreference.com/w/cpp/language/lambda | |
// mutable lambda's operator() is not const, |
This file contains hidden or 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
cmake_minimum_required(VERSION 3.14) | |
project("ROS2 Master") | |
# usually I put this in a separate file include("/opt/ros/_common/Colcon.cmake") | |
function(colcon_add_subdirectories) | |
cmake_parse_arguments(PARSE_ARGV 0 "ARG" "" "BUILD_BASE;BASE_PATHS" "") | |
message("search criteria: ${ARGV}") | |
execute_process(COMMAND colcon list |
This file contains hidden or 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 <sstream> | |
#include <iostream> | |
#include <iomanip> | |
std::string uint8_to_hex_string(const uint8_t *v, const size_t s) { | |
std::stringstream ss; | |
ss << std::hex << std::setfill('0'); | |
for (int i = 0; i < s; i++) { |
This file contains hidden or 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 "rxcpp/rx-scheduler.hpp" | |
// TODO: C++17 Networking TS | |
#ifdef WITHOUT_BOOST | |
// Standalone ASIO | |
#include <asio.hpp> | |
namespace asio_ns=::asio | |
namespace system_ns=::std | |
#else | |
// Boost.ASIO |
This file contains hidden or 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
# Set up some logging. VERY useful to see why things aren't working. | |
logger_syslog=-1 | |
logger_syslog_level=2 | |
logger_stdout=-1 | |
logger_stdout_level=2 | |
# Which interface to use and which bridge to join | |
interface=wlan0 | |
bridge=br0 |