Skip to content

Instantly share code, notes, and snippets.

View drdanz's full-sized avatar
:octocat:
Busy

Daniele E. Domenichelli drdanz

:octocat:
Busy
View GitHub Profile
#!/bin/bash
#=============================================================================
# Copyright 2014, 2016 iCub Facility, Istituto Italiano di Tecnologia
# Authors: Daniele E. Domenichelli <daniele.domenichelli@iit.it>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
@drdanz
drdanz / CMakeLists.txt
Last active March 27, 2019 13:59
getLibraryPath, getCurrentExecutablePath, and getInstallPrefix
cmake_minimum_required(VERSION 3.0)
project(foo)
find_package(YARP REQUIRED)
add_library(foo SHARED foo.cpp foo.h)
target_link_libraries(foo PRIVATE dl)
add_library(bar STATIC bar.cpp bar.h)
@drdanz
drdanz / CMakeLists.txt
Created February 8, 2019 15:23
YARP thrift bug
cmake_minimum_required(VERSION 3.5)
cmake_policy(SET CMP0074 NEW)
project(test_thrift_list_i8)
find_package(YARP 3.1.100 COMPONENTS OS sig idl_tools REQUIRED)
yarp_add_idl(FOO test.thrift)
add_executable(test_thrift_list_i8 main.cpp ${FOO})
#!/bin/sh
# for repo in $(~/Workspace/iit/src/robotology.github.io/scripts/list-all-repos.py); do
rm -f out.txt
for repo in $(cat ../vvv-repo-list.txt); do
echo "REPO: $repo"
@drdanz
drdanz / Bar.cpp
Created May 10, 2019 06:58
test_thrift_return_vector
#include "Bar.h"
bool Bar::configure(yarp::os::ResourceFinder &rf)
{
if (!rpcService.open("/test_thrift_return_vector")) {
return false;
}
return this->yarp().attachAsServer(rpcService);
}
#include <yarp/os/Network.h>
#include <yarp/os/Port.h>
#include <yarp/os/Bottle.h>
#include <yarp/os/LogStream.h>
#include <yarp/os/ConnectionReader.h>
#include <yarp/sig/Vector.h>
#include <thread>
#include <chrono>
using namespace std::chrono_literals;