repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
blackbestiya/ptusa_main
test/mode_mngr_tests.cpp
#include "mode_mngr_tests.h" using namespace ::testing; /* TEST METHOD DEFENITION: void evaluate() */ TEST( open_seat_action, evaluate ) { char* res = 0; mock_params_manager* par_mock = new mock_params_manager(); test_params_manager::replaceEntity( par_mock ); EXPECT_CALL( *par_mock, init( _ ) ); EXPECT_CAL...
sashakh/TSPTW
main.cpp
<filename>main.cpp //------------------------------------------------------------------------------ #include "includes.h" #include "defaulttimer.h" #include "gvns.h" //------------------------------------------------------------------------------ #include "tsptwreader.h" //----------------------------------------------...
gaydaci/flatland
flatland_plugins/src/simple.cpp
#include <flatland_plugins/simple.h> //#include "../include/simple.h" #include <pluginlib/class_list_macros.h> #include <ros/ros.h> using namespace flatland_server; namespace flatland_tutorials { void Simple::OnInitialize(const YAML::Node &config) { ROS_ERROR_STREAM("Hello world"); } }; PLUGINLIB_EXPORT_CLASS(fl...
gaydaci/flatland
flatland_plugins/src/const_velocity.cpp
#include <flatland_plugins/laser.h> #include <pluginlib/class_list_macros.h> #include <flatland_server/yaml_reader.h> #include <flatland_server/exceptions.h> #include <flatland_plugins/const_velocity.h> namespace flatland_plugins { void ConstVelocity::OnInitialize(const YAML::Node &config) { flatland_server::YamlRe...
gaydaci/flatland
flatland_plugins/test/sound_test.cpp
<reponame>gaydaci/flatland<filename>flatland_plugins/test/sound_test.cpp #include <flatland_plugins/sound.h> #include <flatland_server/model_plugin.h> #include <gtest/gtest.h> #include <pluginlib/class_loader.h> #include <ros/ros.h> TEST(SoundPluginTest, load_test) { pluginlib::ClassLoader<flatland_server::ModelPlug...
gaydaci/flatland
flatland_plugins/src/sound.cpp
<filename>flatland_plugins/src/sound.cpp #include <flatland_plugins/sound.h> #include <pluginlib/class_list_macros.h> #include <flatland_server/yaml_reader.h> #include <ros/ros.h> #include <ros/node_handle.h> namespace flatland_plugins { void SoundPlugin::sleepok(int t, ros::NodeHandle &nh) { if (nh_.ok()) sl...
SigureMo/os-work
labs/lab3.cpp
<filename>labs/lab3.cpp #include <iostream> using namespace std; typedef struct page { union { int num; int size; } Meta; struct page* next; } Page, *Memory; int N, M, F; void FIFO(int num, Memory front, Memory rear); void LRU(int num, Memory front, Memory rear); void inline PageJoin(int num, Memory f...
SigureMo/os-work
labs/lab4.cpp
<gh_stars>1-10 #include <iostream> #include <math.h> #include <algorithm> #define INF 999999 using namespace std; int D = 0; int maxIdx = -1, minIdx = INF; int direct = 1; int SSTF(int N, int S, bool* track); int SCAN(int N, int S, bool* track); int main(int argc, char* argv[]){ if (argc < 2) { cout << "Pleas...
SigureMo/os-work
labs/lab1-3/main.cpp
<gh_stars>1-10 #include <iostream> #include <unistd.h> #include <fcntl.h> #include <sys/wait.h> #include <string> using namespace std; int main(int argc, char* argv[]){ if (argc < 2) { cout << "number of arguments < 2!" << endl; return -1; } string action = argv[1]; char** nums = new char*[argc]; nums = argv...
SigureMo/os-work
labs/lab5.cpp
<reponame>SigureMo/os-work<filename>labs/lab5.cpp<gh_stars>1-10 #include <iostream> #include <sstream> #include <math.h> #include <stdlib.h> #include <vector> #define randint(start, end) (rand()%(end-start) + start) #define BLOCK_NUM 500 #define BLOCK_SIZE 2000 using namespace std; typedef struct { string name; i...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/03_others/Mutex.cpp
<filename>controllers/naoqi_webots/nao/03_others/Mutex.cpp #include "Mutex.hpp" Mutex::Mutex() : mutex {new pthread_mutex_t} { pthread_mutex_init(mutex, NULL); } void Mutex::lock() { pthread_mutex_lock(mutex); } void Mutex::unlock() { pthread_mutex_unlock(mutex); } Mutex::~Mutex() { pthread_mutex_de...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/i2c/earsdevicev3_3.hpp
/* ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2008, 2010 Aldebaran Robotics */ #ifndef _EARSI2CV33_HPP_ # define _EARSI2CV33_HPP_ # include <bn/common.hpp> # include <bn/i2c/devicei2c.hpp> # include <bn/i2c/earsdevice.hpp> namespace bn { namespace i2c { namespace hw_v3_3 { con...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/01_sensors/Bumper.cpp
#include "Bumper.hpp" Bumper::Bumper(const Sim::BumperSensor *sensor, int step) : Device(sensor->name()), m_tag {wb_robot_get_device(sensor->name().c_str())}, m_sensor {sensor} { std::cout << "\n\t\t\t\t\t" << __FILE__ << ": Inside constructor."; if (!m_tag) std::cerr << "\nCERR << Web...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pyobject.hpp
#pragma once /* ** Copyright (C) 2013 <NAME> ** See COPYING for the license */ #ifndef _QIPYTHON_PYOBJECT_HPP_ #define _QIPYTHON_PYOBJECT_HPP_ #include <boost/python.hpp> #include <qitype/anyobject.hpp> #include <qipython/api.hpp> namespace qi { namespace py { QIPYTHON_API boost::python::object makePyQiObjec...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qimessaging/api.hpp
<filename>old_aldebaran_cplusplus_sdk/include/qimessaging/api.hpp<gh_stars>1-10 #pragma once /* ** Copyright (C) 2012 <NAME> ** See COPYING for the license */ #ifndef _QIMESSAGING_API_HPP_ #define _QIMESSAGING_API_HPP_ #include <qi/macro.hpp> #define QIMESSAGING_API QI_LIB_API(qimessaging) #endif // _QIMESSAGIN...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qiperf/dataperfsuite.hpp
/* ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2012-2013 Aldebaran Robotics */ #pragma once #ifndef _QI_PERF_DATAPERFSUITE_HPP_ #define _QI_PERF_DATAPERFSUITE_HPP_ #include <string> #include <qiperf/api.hpp> #include <qiperf/dataperf.hpp> namespace qi { class DataPerfSuitePrivate; /// A class t...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/spy/spy.hpp
<filename>old_aldebaran_cplusplus_sdk/include/bn/spy/spy.hpp /* ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009, 2010 Aldebaran Robotics */ #ifndef SPY_HPP_ # define SPY_HPP_ # include <usb.h> # include <bn/common.hpp> namespace bn { namespace spy { class Spy { public: Spy(); ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/i2c/eyesdevice.hpp
// // eyesdevice.hpp for libbn // // Made by <NAME> // Login <<EMAIL>> // // Started on Wed Dec 17 08:44:50 2008 <NAME> // Last update Wed Jul 15 11:52:20 2009 <NAME> // // Copyright (C) 2008 Aldebaran Robotics // #ifndef EYESDEVICE_HPP_ # define EYESDEVICE_HPP_ # include <bn/common.hpp> # include <bn/i2c/devicei2...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qiperf/api.hpp
/** @file * @brief dll import/export and compiler message */ #pragma once #ifndef _LIBQI_QI_PERF_CONFIG_HPP_ #define _LIBQI_QI_PERF_CONFIG_HPP_ #include <qi/macro.hpp> // qiperf controls which symbols are exported when libqiperf // is compiled as a SHARED lib. // DO NOT USE OUTSIDE LIBQIPERF #ifdef qiperf_EXPORTS...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pysignal.hpp
<reponame>fernandozuher/naoqi_webots<filename>old_aldebaran_cplusplus_sdk/include/qipython/pysignal.hpp #pragma once /* ** Copyright (C) 2013 <NAME> ** See COPYING for the license */ #ifndef _QIPYTHON_PYSIGNAL_HPP_ #define _QIPYTHON_PYSIGNAL_HPP_ #include <boost/python.hpp> #include <qitype/typeinterface.hpp> #incl...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pyasync.hpp
#pragma once /* ** Copyright (C) 2013 Aldebaran Robotics ** See COPYING for the license */ #ifndef _QIPYTHON_PYASYNC_HPP_ #define _QIPYTHON_PYASYNC_HPP_ namespace qi { namespace py { void export_pyasync(); } } #endif // _QIPYTHON_PYASYNC_HPP_
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/Nao.hpp
// Description: Class that represents a single Nao robot and its devices #ifndef NAO_HPP #define NAO_HPP #include "../common_library.hpp" // C++ library//////////////////////////////////////////////////////////////// #include <list> #include <cmath> #include <cassert> // Written to this controller//////////////////...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/xml.hpp
/* -*- Mode: C++; -*- */ /* ** Login : <<EMAIL>> ** Started on Mon Sep 29 14:40:19 2008 <NAME> ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2008 Aldebaran Robotics */ #ifndef _XML_HPP_ # define _XML_HPP_ # include <bn/xml/tinyxml.h> #endif
fernandozuher/naoqi_webots
controllers/naoqi_webots/naoqi_webots.cpp
<reponame>fernandozuher/naoqi_webots<gh_stars>1-10 // Description: Interface between Webots and Nao simulation SDK #include "naoqi_webots.hpp" int main(int argc, char *argv[]) { naoqi_webots obj {argc, argv}; return 0; } ////////////////////////////////////////////////////////////////////////////// naoqi_web...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/common/error.hpp
<reponame>fernandozuher/naoqi_webots<gh_stars>1-10 /* ** error.hpp ** Login : <<EMAIL>> ** Started on Fri Apr 3 10:53:53 2009 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009 Aldebaran Robotics */ #ifndef ERROR_HPP_ # define ERROR_HPP_ # include <cstdlib> # include <bn/common/ty...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pyexport.hpp
#pragma once /* ** Copyright (C) 2013 Aldebaran Robotics ** See COPYING for the license */ #ifndef _QIPYTHON_PYEXPORT_HPP_ #define _QIPYTHON_PYEXPORT_HPP_ #include <qipython/api.hpp> namespace qi { namespace py { QIPYTHON_API void export_all(); } } #endif // _QIPYTHON_PYEXPORT_HPP_
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/rt/rtperiod.hpp
<filename>old_aldebaran_cplusplus_sdk/include/bn/rt/rtperiod.hpp /* -*- C++ -*- */ /** * @author <NAME> * Aldebaran Robotics (c) 2008 All Rights Reserved - This file is confidential. * */ #ifndef RTPERIOD_H_ # define RTPERIOD_H_ # include <bn/rt.hpp> # include <time.h> namespace bn { namespace rt { /** ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/gil.hpp
#pragma once /* ** Copyright (C) 2013 <NAME> ** See COPYING for the license */ #ifndef _QIPYTHON_GIL_HPP_ #define _QIPYTHON_GIL_HPP_ #include <qi/log.hpp> #include <boost/python.hpp> namespace qi { namespace py { //Acquire the GIL if needed //and setup the thread in the python world if needed // ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pyobjectfactory.hpp
#pragma once /* ** Copyright (C) 2013 Aldebaran Robotics ** See COPYING for the license */ #ifndef _QIPYTHON_PYOBJECTFACTORY_HPP_ #define _QIPYTHON_PYOBJECTFACTORY_HPP_ namespace qi { namespace py { void export_pyobjectfactory(); } } #endif // _QIPYTHON_PYOBJECTFACTORY_HPP_
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/i2c/earsdevice.hpp
<filename>old_aldebaran_cplusplus_sdk/include/bn/i2c/earsdevice.hpp /* ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2008, 2010 Aldebaran Robotics */ #ifndef _EARSI2C_HPP_ # define _EARSI2C_HPP_ # include <bn/common.hpp> # include <bn/i2c/devicei2c.hpp> namespace bn { namespace i2c { /** ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/spy/spyusb.hpp
<filename>old_aldebaran_cplusplus_sdk/include/bn/spy/spyusb.hpp /* ** spyusb.h ** Login : <<EMAIL>> ** Started on Fri Mar 20 18:14:26 2009 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009, 2010 Aldebaran Robotics */ #ifndef SPYUSB_HPP_ # define SPYUSB_HPP_ # include <usb.h> # inc...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/alcommon/alproxy.hxx
<filename>old_aldebaran_cplusplus_sdk/include/alcommon/alproxy.hxx<gh_stars>1-10 /** * AUTOGENERATED CODE, DO NOT EDIT * @author <NAME> * Copyright (c) <NAME> 2010, 2011, 2012 All Rights Reserved */ #pragma once #ifndef _LIBALCOMMON_ALCOMMON_ALPROXY_HXX_ #define _LIBALCOMMON_ALCOMMON_ALPROXY_HXX_ #include <qitype...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/usb/chestusb.hpp
/* -*- Mode: C++; -*- */ /** * @author <NAME> <<EMAIL>> * Aldebaran Robotics (c) 2008 All Rights Reserved - This file is confidential. * * Version : $Id$ */ #ifndef CHESTUSB_H_ # define CHESTUSB_H_ # include <bn/common.hpp> namespace bn { namespace usb { /** * BEGIN : IMPORTED FROM CHESTBOARD CODE */ ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/common/win-posix.hpp
<gh_stars>1-10 /* -*- C++ -*- */ /** * @author <NAME> * Aldebaran Robotics (c) 2008 All Rights Reserved - This file is confidential. * * Version : $Id$ * Windows Is Not Posix version */ #ifdef WIN32 # define snprintf _snprintf #endif
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/01_sensors/Fsr.cpp
#include "Fsr.hpp" Fsr::Fsr(std::vector<const Sim::FSRSensor*> sensors, int step, std::string name) : Device(name), m_filter(std::vector<Low_Pass_Filter *>(4)) { std::cout << "\n\t\t\t\t\t" << __FILE__ << ": Inside constructor."; m_fsr_sensors = sensors; m_tag = wb_robot_get_device(name.c_str...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/common/daemon.hpp
<reponame>fernandozuher/naoqi_webots /* ** daemon.hpp ** Login : <<EMAIL>> ** Started on Sun Apr 5 00:51:56 2009 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009 <NAME> */ #ifndef DAEMON_HPP_ # define DAEMON_HPP_ # include <bn/common/types.hpp> # include <bn/common/error.hpp> # ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/ipc/shmtypes.hpp
/* ** shmtypes.hpp ** Login : <<EMAIL>> ** Started on Sun Mar 29 19:45:35 2009 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009 Aldebaran Robotics */ #ifndef SHMTYPES_HPP_ # define SHMTYPES_HPP_ #include <boost/interprocess/managed_shared_memory.hpp> #include <boost/interprocess/...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/rt/rtprintf.hpp
/** * @author <NAME> * Aldebaran Robotics (c) 2008 All Rights Reserved - This file is confidential. * * Version : $Id$ */ /** * This file implement a real-time thread safe printf * * TODO: * - display when overflow occur */ #ifndef __PRINTF_HPP__ #define __PRINTF_HPP__ # include <bn/rt.hpp> namespace bn ...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/03_others/Timer.hpp
<reponame>fernandozuher/naoqi_webots // Description: Class helping to measure delta time in milliseconds #ifndef TIMER_HPP #define TIMER_HPP // C library #include <cstdlib> // Unix systems library #include <sys/time.h> class Timer { private: double __time() const; // second double before_time; ...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/03_others/Mutex.hpp
<gh_stars>1-10 // Description: Class that implements a platform independent mutex #ifndef MUTEX_HPP #define MUTEX_HPP // C library #include <cstdlib> // Unix systems library #include <pthread.h> class Mutex { private: pthread_mutex_t *mutex; public: Mutex(); virtual ~Mutex(); ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/i2c.hpp
/* -*- Mode: C++; -*- */ /* ** Login : <<EMAIL>> ** Started on Mon Sep 29 14:40:19 2008 <NAME> ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2008 Aldebaran Robotics */ #ifndef _I2C_HPP_ # define _I2C_HPP_ # include <bn/common.hpp> # include <bn/i2c/devicei2c.hpp> # include <bn/i2c/earsdevice.hpp...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qimessaging/session.hpp
<reponame>fernandozuher/naoqi_webots #pragma once /* ** Copyright (C) 2012 <NAME> ** See COPYING for the license */ #ifndef _QIMESSAGING_SESSION_HPP_ #define _QIMESSAGING_SESSION_HPP_ #include <qimessaging/api.hpp> #include <qimessaging/serviceinfo.hpp> #include <qi/future.hpp> #include <qitype/anyobject.hpp> #incl...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/usb.hpp
/* -*- Mode: C++; -*- */ /* ** Login : <<EMAIL>> ** Started on Mon Sep 29 14:48:11 2008 <NAME> ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2008 Aldebaran Robotics */ #ifndef _HARDWARE_HPP_ # define _HARDWARE_HPP_ # include <bn/common.hpp> # include <bn/usb/usb.hpp> # include <bn/usb/chestboar...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/02_actuators/Hip_Motor.cpp
#include "Hip_Motor.hpp" Hip_Motor::Hip_Motor(int step) : Device("HipYawPitch") { std::cout << "\n\t\t\t\t\t" << __FILE__ << ": Inside constructor."; m_actuator = Singletons::model()->angleActuator("LHipYawPitch"); m_left_tag = wb_robot_get_device("LHipYawPitch"); m_right_tag = wb_robot_get_device("RH...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/i2c/facedevice.hpp
/* ** facedevice.hpp ** Login : <<EMAIL>> ** Started on Fri Feb 6 12:31:34 2009 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009 Aldebaran Robotics */ #ifndef FACEDEVICE_HPP_ # define FACEDEVICE_HPP_ namespace bn { namespace i2c { class FaceDevice : public DeviceI2c, pu...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/03_others/Low_Pass_Filter.hpp
<gh_stars>1-10 // Description: Simulate an electronical low pass filter // Source: http://en.wikipedia.org/wiki/Lowpass_filter #ifndef LOW_PASS_FILTER_HPP #define LOW_PASS_FILTER_HPP class Low_Pass_Filter { private: double m_current_filtered_value, m_previous_filtered_value; double m_current_...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/trace.hpp
<gh_stars>1-10 #pragma once /* ** Copyright (C) 2013 <NAME> ** See COPYING for the license */ #ifndef _QIPYTHON_TRACE_HPP_ #define _QIPYTHON_TRACE_HPP_ #include <qipython/api.hpp> #include <string> namespace qi { namespace py { QIPYTHON_API std::string thread_traces(); } } #endif // _QIPYTHON_TRACE_HPP_
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/common/types.hpp
<gh_stars>1-10 /** * @author <NAME> * Aldebaran Robotics (c) 2007 All Rights Reserved - This file is confidential. * * Version : $Id$ */ #ifndef __TYPES_H__ #define __TYPES_H__ // standard type definitions typedef unsigned long long uInt64; typedef signed long long sInt64; typedef signed long long ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/ps/spawn.hpp
// // spawn.hpp for libbn // // Made by <NAME> // Login <<EMAIL>> // // Started on Wed Dec 10 15:35:03 2008 <NAME> // Last update Wed Oct 28 11:41:59 2009 <NAME> // #ifndef SPAWN_HPP_ # define SPAWN_HPP_ # include <signal.h> # include <cstdio> # include <cstdlib> # include <sys/types.h> # ifdef __linux__ # ifnde...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/01_sensors/Fsr.hpp
// Description: Simulated Force Sensitive Resistor (FSR) of the Nao robot #ifndef FSR_HPP #define FSR_HPP #include "../../common_library.hpp" // C++ library #include <cassert> // Webots library #include <webots/touch_sensor.h> // Written to this controller // Others #include "../03_others/Low_Pass_Filter.hpp" #inc...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/common.hpp
/* -*- Mode: C++; -*- */ /* ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2008, 2010, 2011 Aldebaran Robotics */ #ifndef _COMMON_HPP_ # define _COMMON_HPP_ # include <bn/common/win-posix.hpp> # include <bn/common/error.hpp> # include <bn/common/types.hpp> # include <bn/common/ptr.hpp> //# include <b...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/spy/spyi2c.hpp
/* ** spyi2c.hpp ** Login : <<EMAIL>> ** Started on Wed Sep 1 10:23:21 2010 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2010 Aldebaran Robotics */ #ifndef SPYI2C_HPP_ # define SPYI2C_HPP_ # include <bn/common.hpp> # include <bn/spy/spy.hpp> # include <bn/i2c/i2c-dev.h> namesp...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pyfuture.hpp
#pragma once /* ** Copyright (C) 2013 <NAME> ** See COPYING for the license */ #ifndef _QIPYTHON_PYFUTURE_HPP_ #define _QIPYTHON_PYFUTURE_HPP_ #include <boost/python.hpp> #include <qi/future.hpp> #include <qitype/anyvalue.hpp> #include <qipython/gil.hpp> #include <qipython/api.hpp> #include <boost/smart_ptr/enable_...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/common/paths.hpp
/* -*- Mode: C++; -*- */ /** * @author <NAME> <<EMAIL>> * Aldebaran Robotics (c) 2008 All Rights Reserved - This file is confidential. * * Version : $Id$ */ #ifndef PATHS_H_ # define PATHS_H_ # include <string> # include <vector> # include <bn/common.hpp> /** * TODO: need to be completed */ namespace ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/i2c/touchdevice.hpp
/* ** earsi2c.hpp ** Login : <<EMAIL>> ** Started on Fri Dec 12 10:40:44 2008 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2008, 2010 Aldebaran Robotics */ #ifndef _TOUCHI2C_HPP_ # define _TOUCHI2C_HPP_ # include <bn/common.hpp> # include <bn/i2c/devicei2c.hpp> namespace bn { n...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/01_sensors/Sonar.cpp
<gh_stars>1-10 #include "Sonar.hpp" Sonar::Sonar(const Sim::SonarSensor *sensor, int step) : Device(sensor->name()), m_tag {wb_robot_get_device(name().c_str())}, m_sensor {sensor} { std::cout << "\n\t\t\t\t\t" << __FILE__ << ": Inside constructor."; if (!m_tag) std::cerr << "\nCERR << Webots DistanceS...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/ps.hpp
// // ps.hpp for libbn // // Made by <NAME> // Login <<EMAIL>> // // Started on Wed Dec 10 15:34:24 2008 <NAME> // Last update Wed Oct 28 18:49:49 2009 <NAME> // #ifndef _PS_HPP_ # define _PS_HPP_ # include <bn/ps/ps.hpp> #endif
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/usb/chestboardprefs.hpp
/* ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2010 Aldebaran Robotics */ #ifndef CHESTBOARDPREFS_HPP_ # define CHESTBOARDPREFS_HPP_ # include <bn/common.hpp> # include <bn/usb/usb.hpp> # include <bn/usb/chestboardmessage.hpp> # include <bn/usb/chestboardmanager.hpp> # include <boost/crc.hpp> name...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/03_others/Timer.cpp
<reponame>fernandozuher/naoqi_webots #include "Timer.hpp" Timer::Timer() { reset(); } double Timer::delta() { return __time() - before_time; } void Timer::reset() { before_time = __time(); } double Timer::__time() const { timeval time; gettimeofday(&time, NULL); long millis {(time.tv_sec * 1...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pysession.hpp
#pragma once /* ** Copyright (C) 2013 Aldebaran Robotics ** See COPYING for the license */ #ifndef _QIPYTHON_PYSESSION_HPP_ #define _QIPYTHON_PYSESSION_HPP_ #include <boost/python.hpp> #include <qimessaging/session.hpp> #include <qipython/api.hpp> namespace qi { namespace py { QIPYTHON_API boost::python::obj...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/02_actuators/Motor.cpp
#include "Motor.hpp" Motor::Motor(const Sim::AngleActuator *actuator, int step) : Device(actuator->name()), m_actuator {actuator} { std::cout << "\n\t\t\t\t\t" << __FILE__ << ": Inside constructor."; m_tag = wb_robot_get_device(name().c_str()); std::string sensor_name {name()}; sensor...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/usb/deviceaddress.hpp
<gh_stars>1-10 /* ** deviceaddress.hpp ** Login : <<EMAIL>> ** Started on Fri Jan 30 14:17:23 2009 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009 Aldebaran Robotics */ #ifndef DEVICEADDRESS_HPP_ # define DEVICEADDRESS_HPP_ namespace bn { namespace usb { static const Int8...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/03_others/Image.hpp
<gh_stars>1-10 // Description: Class for storing and resampling pixmap images #ifndef IMAGE_HPP #define IMAGE_HPP class Image { private: int m_width, m_height; unsigned char *m_data; bool m_free_data; public: // data is a pointer to a BGRA image buffer Image(int width,...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qimessaging/gateway.hpp
#pragma once /* ** Copyright (C) 2012 <NAME> ** See COPYING for the license */ #ifndef _QIMESSAGING_GATEWAY_HPP_ #define _QIMESSAGING_GATEWAY_HPP_ # include <qimessaging/url.hpp> namespace qi { class GatewayPrivate; class QIMESSAGING_API Gateway { public: Gateway(); ~Gateway(); bool attachToS...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/usb/chestboard.hpp
<gh_stars>1-10 /* -*- Mode: C++; -*- */ /** * @author <NAME> * Aldebaran Robotics (c) 2008 All Rights Reserved - This file is confidential. * * Version : $Id$ */ #ifndef CHESTBOARD_HPP_ # define CHESTBOARD_HPP_ namespace bn { namespace usb { namespace hw { #define LIBUSB_ENDPOINT_IN (0x80) ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/rt/rttime.hpp
/* -*- C++ -*- */ /** * @author <NAME>, modifications <NAME> * Aldebaran Robotics (c) 2008 All Rights Reserved - This file is confidential. * * Version : $Id$ */ #ifndef RTTIME_HPP_ # define RTTIME_HPP_ #include <time.h> #include <pthread.h> #include <bn/rt.hpp> namespace bn { namespace rt { static cons...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/usb/chestboardflasher.hpp
<reponame>fernandozuher/naoqi_webots /* ** chestboardflasher.hpp ** Login : <<EMAIL>> ** Started on Mon Feb 2 12:02:58 2009 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009, 2011 Aldebaran Robotics */ #ifndef CHESTBOARDFLASHER_HPP_ # define CHESTBOARDFLASHER_HPP_ # include <bn/u...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/02_actuators/Motor.hpp
// Description: A class for interfacing any of the (active) motor including // the wheels (of Pepper) #ifndef MOTOR_HPP #define MOTOR_HPP #include "../../common_library.hpp" // Webots library #include <webots/motor.h> #include <webots/position_sensor.h> // Written to this controller // Others #include "../03_others...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/common/ptr.hpp
/* -*- Mode: C++; -*- */ /** * @author aldebaran-robotics * Aldebaran Robotics (c) 2008 All Rights Reserved - This file is confidential.\n * */ #ifndef PTR_HPP #define PTR_HPP #include <vector> #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> #include <boost/enable_shared_from_this.hpp> namespace bn { ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/rt.hpp
/* ** rttools.h ** Login : <<EMAIL>> ** Started on Wed Dec 10 11:39:17 2008 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2008 Aldebaran Robotics */ #ifndef RT_HPP_ # define RT_HPP_ # include <bn/common.hpp> # include <bn/rt/time-winp.h> # include <bn/rt/time-osxp.h> # include <bn/...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/ipc/processsync.hpp
<filename>old_aldebaran_cplusplus_sdk/include/bn/ipc/processsync.hpp /* ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2010 Aldebaran Robotics */ #ifndef BN_IPC_SYNCBASE_HPP_ # define BN_IPC_SYNCBASE_HPP_ #include <boost/interprocess/sync/named_condition.hpp> #include <boost/interprocess/sync/named...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/ps/ps.hpp
<filename>old_aldebaran_cplusplus_sdk/include/bn/ps/ps.hpp // // ps.hpp for libbn // // Made by <NAME> // Login <<EMAIL>> // // Started on Wed Dec 10 15:34:39 2008 Laurent Lec // Last update Wed Dec 10 15:46:00 2008 Laurent Lec // #ifndef PSM_HPP_ # define PSM_HPP_ # include <fstream> # include <iostream> # include...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/ipc/processsyncclient.hpp
<reponame>fernandozuher/naoqi_webots /* ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2010 Aldebaran Robotics */ #ifndef PROCESSSYNCCLIENT_HPP_ # define PROCESSSYNCCLIENT_HPP_ #include <bn/ipc/processsync.hpp> namespace bn { /** * Sync a client and a server, the client will run when the ser...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/ipc/processsyncserver_pipe.hpp
<filename>old_aldebaran_cplusplus_sdk/include/bn/ipc/processsyncserver_pipe.hpp /* ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2010, 2011 Aldebaran Robotics */ #ifndef PROCESSSYNCSERVER_PIPE_HPP_ # define PROCESSSYNCSERVER_PIPE_HPP_ namespace bn { /** * Sync a client and a server, the server ...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/03_others/Image.cpp
<reponame>fernandozuher/naoqi_webots #include "Image.hpp" Image::Image(int width, int height, const unsigned char *data) : m_width {width}, m_height {height}, m_data {const_cast<unsigned char*>(data)}, m_free_data {false} {} // RGB image data in bytes as an array of [width][height][3] unsigned char* I...
fernandozuher/naoqi_webots
controllers/naoqi_webots/common_library.hpp
<reponame>fernandozuher/naoqi_webots // C++ library #include <iostream> // std::cerr, std::cout #include <string> // std::string, std::to_string #include <vector> // vector<> ////////////////////////////////////////////////////////////////////////////// // Webots #include <webots/robot.h> #include <webots/Robot.hpp> /...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pythreadsafeobject.hpp
#pragma once /* ** Copyright (C) 2013 <NAME> ** See COPYING for the license */ #ifndef _QIPYTHON_PYTHREADSAFEOBJECT_HPP_ #define _QIPYTHON_PYTHREADSAFEOBJECT_HPP_ #include <boost/python.hpp> namespace qi { namespace py { // This class ensure boost::python::object are copied in a threadsafe // manner. ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qimessaging/applicationsession.hpp
#pragma once /* * Copyright (c) 2013 Aldebaran Robotics. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the COPYING file. */ #ifndef QIMESSAGING_APPLICATIONSESSION_HPP_ #define QIMESSAGING_APPLICATIONSESSION_HPP_ #include <boost/noncopyable.hpp> #include <q...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/01_sensors/Camera.cpp
<reponame>fernandozuher/naoqi_webots #include "Camera.hpp" Camera::Camera(const Sim::CameraSensor *sensor, int time_step) : Device(sensor->name()), m_sensor {sensor} { std::cout << "\n\n\t\t\t\t\t" << __FILE__ << ": Inside constructor."; std::cout << "\n\t\t\t\t\t\t" << name() << ":" ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/ipc/shmfactory.hxx
/* ** shmfactory.hxx ** Login : <<EMAIL>> ** Started on Mon Mar 30 13:31:25 2009 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009 Aldebaran Robotics */ //protect against bad #include //this file should only be include by shmfactory.hpp #ifdef INCLUDE_HXX_TEMPLATE # ifndef SHMFACTORY...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/01_sensors/Camera.hpp
// Description: Class that simulates one camera of the robot #ifndef CAMERA_HPP #define CAMERA_HPP #include "../../common_library.hpp" // Webots library #include <webots/camera.h> // Written to this controller // Others #include "../03_others/Image.hpp" namespace Sim { class CameraSensor; }; class Camera : pu...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pyapplication.hpp
#pragma once /* ** Copyright (C) 2013 Aldebaran Robotics ** See COPYING for the license */ #ifndef _QIPYTHON_PYAPPLICATION_HPP_ #define _QIPYTHON_PYAPPLICATION_HPP_ namespace qi { namespace py { void export_pyapplication(); void export_pyapplicationsession(); } } #endif // _QIPYTHON_PYAPPLICATION_HPP_...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/03_others/Singletons.cpp
<filename>controllers/naoqi_webots/nao/03_others/Singletons.cpp<gh_stars>1-10 #include "Singletons.hpp" Sim::Model* Singletons::m_model {nullptr}; Sim::HALInterface* Singletons::m_hal {nullptr}; Sim::SimLauncher* Singletons::m_launcher {nullptr}; bool Singletons::initialize(const std::string &model, int naoqi_port, ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pyinit.hpp
<filename>old_aldebaran_cplusplus_sdk/include/qipython/pyinit.hpp #pragma once /* ** Copyright (C) 2013 <NAME> ** See COPYING for the license */ #ifndef _QIPYTHON_PYINIT_HPP_ #define _QIPYTHON_PYINIT_HPP_ #include <qipython/api.hpp> namespace qi { namespace py { /// Initialise Python and release the lock. Th...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/usb/chestboardmessage.hpp
/* ** chestboardmessage.hpp ** Login : <<EMAIL>> ** Started on Tue Jan 27 09:11:15 2009 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009 Aldebaran Robotics */ #ifndef CHESTBOARDMESSAGE_HPP_ # define CHESTBOARDMESSAGE_HPP_ #include <bn/usb/deviceaddress.hpp> namespace bn { nam...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/common/sharedlibrary.hpp
/* -*- Mode: C++; -*- */ /** * @author aldebaran-robotics * Aldebaran Robotics (c) 2007 All Rights Reserved - This file is confidential.\n * * Version : $Id$ */ #ifndef SHARED_LIBRARY #define SHARED_LIBRARY # include <string> # include <bn/common.hpp> # ifdef WIN32 # include <windows.h> # else # include <dlfcn.h> ...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/03_others/Device.hpp
// Description: Abstract base class for all simulated devices in this project #ifndef DEVICE_HPP #define DEVICE_HPP #include "../../common_library.hpp" class Device { private: std::string m_name; public: Device(const std::string &name) : m_name {name} {} virtual ~Device() {} ...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qi/eventloop.hpp
<reponame>fernandozuher/naoqi_webots #pragma once /* ** Copyright (C) 2012 Aldebaran Robotics ** See COPYING for the license */ #ifndef _QI_EVENTLOOP_HPP_ #define _QI_EVENTLOOP_HPP_ #ifdef _MSC_VER # pragma warning( disable: 4503 ) // decorated name length #endif #include <boost/shared_ptr.hpp> #include <boost/fu...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pylog.hpp
<reponame>fernandozuher/naoqi_webots<filename>old_aldebaran_cplusplus_sdk/include/qipython/pylog.hpp #pragma once /* ** Copyright (C) 2013 <NAME> ** See COPYING for the license */ #ifndef _QIPYTHON_PYLOG_HPP_ # define _QIPYTHON_PYLOG_HPP_ namespace qi { namespace py { void export_pylog(); } } #endif // !_Q...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/01_sensors/Sonar.hpp
// Description: Sonar sensor #ifndef SONAR_HPP #define SONAR_HPP #include "../../common_library.hpp" // Webots library #include <webots/distance_sensor.h> namespace Sim { class SonarSensor; } class Sonar : public Device { private: WbDeviceTag m_tag; const Sim::SonarSensor *m_sensor; pu...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/03_others/Low_Pass_Filter.cpp
<reponame>fernandozuher/naoqi_webots #include "Low_Pass_Filter.hpp" Low_Pass_Filter::Low_Pass_Filter(double time_interval, double rctime_constant) : m_current_filtered_value {0.0}, m_previous_filtered_value {0.0}, m_current_raw_value {0.0}, m_size {0} { m_alpha = time_interval / (rctime_constant + time_int...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/02_actuators/Hand.cpp
<reponame>fernandozuher/naoqi_webots #include "Hand.hpp" Hand::Hand(const Sim::CoupledActuator *actuator, int step) : Device(actuator->name()) { std::cout << "\n\t\t\t\t\t" << __FILE__ << ": Inside constructor."; m_actuator = actuator; std::string device_format; if (name() == "LHand") ...
fernandozuher/naoqi_webots
controllers/naoqi_webots/naoqi_webots.hpp
<filename>controllers/naoqi_webots/naoqi_webots.hpp // Description: Interface between Webots and Nao simulation SDK #ifndef NAOQI_WEBOTS_HPP #define NAOQI_WEBOTS_HPP #include "common_library.hpp" // C++ library #include <exception> // std::exception #include <boost/lexical_cast.hpp> // boost::lexical_cast<int>() //...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/ipc/blackboard.hpp
<reponame>fernandozuher/naoqi_webots<gh_stars>1-10 /* ** shmmodulestore.hpp ** Login : <<EMAIL>> ** Started on Sat Apr 18 12:31:22 2009 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009 Aldebaran Robotics */ #ifndef BLACKBOARD_HPP_ # define BLACKBOARD_HPP_ #include <bn/ipc/shmtype...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/i2c/devicei2c.hpp
/* ** headi2c.hpp ** Login : <<EMAIL>> ** Started on Thu Dec 11 18:09:09 2008 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2008 Aldebaran Robotics */ #ifndef _DEVICEI2C_HPP_ # define _DEVICEI2C_HPP_ # include <bn/common.hpp> # include <bn/i2c/i2c-dev.h> # include <sys/types.h> # include...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/qipython/pypath.hpp
#pragma once /* ** Copyright (C) 2014 <NAME> ** See COPYING for the license */ #ifndef _PYTHON_SRC_PYPATH_HPP_ # define _PYTHON_SRC_PYPATH_HPP_ namespace qi { namespace py { void export_pypath(); } } #endif
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/02_actuators/Hand.hpp
<reponame>fernandozuher/naoqi_webots // Description: Class for controlling a Nao hand #ifndef HAND_HPP #define HAND_HPP #include "../../common_library.hpp" // C++ library #include <boost/lexical_cast.hpp> // boost::lexical_cast<char*>() // Webots library #include <webots/motor.h> namespace Sim { class CoupledA...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/ipc/processsyncclient_pipe.hpp
<gh_stars>1-10 /* ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2010, 2011 Aldebaran Robotics */ #ifndef PROCESSSYNCCLIENT_PIPE_HPP_ # define PROCESSSYNCCLIENT_PIPE_HPP_ namespace bn { /** * Sync a client and a server, the client will run * when the server allow him to run * * This wor...
fernandozuher/naoqi_webots
controllers/naoqi_webots/nao/01_sensors/Inertial_Unit.hpp
// Description: Simulate the Nao's inertial unit using Webots Accelerometer, // Gyro, and Inertial_Unit #ifndef INERTIAL_UNIT_HPP #define INERTIAL_UNIT_HPP #include "../../common_library.hpp" // C++ library #include <cmath> // Webots library #include <webots/inertial_unit.h> #include <webots/accelerometer.h> #inclu...
fernandozuher/naoqi_webots
old_aldebaran_cplusplus_sdk/include/bn/ipc/shmfactory.hpp
/* ** shmfactory.hpp ** Login : <<EMAIL>> ** Started on Sun Mar 29 19:37:06 2009 <NAME> ** $Id$ ** ** Author(s): ** - <NAME> <<EMAIL>> ** ** Copyright (C) 2009 Aldebaran Robotics */ #ifndef SHMFACTORY_HPP_ # define SHMFACTORY_HPP_ #include <boost/interprocess/managed_shared_memory.hpp> #include <boost/interpr...