GithubHelp home page GithubHelp logo

asrob-uc3m / yarp-devices Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 2.0 499 KB

Yet another place for YARP devices.

Home Page: https://asrob.uc3m.es/yarp-devices/

License: GNU Lesser General Public License v2.1

CMake 14.91% Shell 3.05% C++ 29.88% Java 0.43% C 23.97% SWIG 27.75%

yarp-devices's People

Contributors

imontesino avatar jgvictores avatar peterbowman avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

imontesino leytha

yarp-devices's Issues

Some devices are broken

Some devices are broken (software-wise) as a result of #4.

LaserTowerOfDeath and Co. will be resurrected (no pun originally intended) once API stabilizes.

Note: EcroWheelController or EcroPwmController have been set to DeprecatedDeviceDriver at 66f12c5.

Align CMake code related to bindings with latest YARP

Same as roboticslab-uc3m/kinematics-dynamics#189 here:

YARP 3.4 is out and introduces an important change: Python 2 is no longer supported. Consequently, it makes no sense to generate Python 2 bindings for the asrob_yarp_devices module and later combine it with the Python 3 YARP module in the same Python script. Therefore, I suggest to update (at last) the dated CMake script we use for generating SWIG bindings (ref), mirroring whatever YARP folks have implemented on their side (ref).

FYI see roboticslab-uc3m/installation-guides@7a9134f.

Timeout needed in LaserTowerOfDeath

@imontesino found out that the LTOD device crashes upon the initial connection check, namely while we try to read the welcome message arriving from the Arduino board:

SerialPort::DataBuffer buffer;
try {
serialPort->Read( buffer, 13, 1500);
}
catch ( SerialPort::ReadTimeout e)
{
std::cout << "Timeout! Exiting..." << std::endl;
return false;
}

The only change wrt previous successful executions: we replaced the Arduino Duemilanove with a Freaduino board (asrob-uc3m/laser-tower-of-death#1 (comment)). It was observed that a convenient one-second delay placed right before said lines fixes this issue. Is this a valid approach?

CMake find_package for certain devices: libserial, wiringpi...

From @jgvictores on December 2, 2017 14:33

Example compilation error:

robotDevastation-robots/libraries/YarpPlugins/LaserTowerOfDeathController/LaserTowerOfDeathController.hpp:14:26: fatal error: SerialStream.h: No such file or directory

Will happen due to:

  • YarpPlugins/LaserTowerOfDeathController/LaserTowerOfDeathController.hpp:#include <SerialStream.h>
  • YarpPlugins/EcroWheelController/EcroWheelController.hpp:#include <SerialStream.h>
  • YarpPlugins/EcroPwmController/EcroPwmController.hpp:#include <SerialStream.h>

Copied from original issue: asrob-uc3m/robotDevastation-robots#41

Edit: see https://github.com/asrob-uc3m/robotDevastation-user-manual/blob/aa35659774f3fb7943918f04167f59a719ed4d0f/en/install-robot-devastation/robots-ubuntu.md

Create new device for Parrot mini drones

I've managed to command the Parrot's Jumping Sumo drone via our robot command interface, that is, I created another device that implements IRobotManager for such purpose. The code is hosted on a separate branch, just one commit so far: 455de61. I did not succeed to receive frames from the onboard camera, and this device could be further expanded to connect to more Parrot products, e.g. flying drones. Other than that, it works and has been tested on the real drone and a RD client instance, which means that we were able to command the robot via keystroke events.

Think about multi-platform serial comm solutions

From bottom of https://ubuntuforums.org/archive/index.php/t-896869.html (mujambee):

Under Unix, a serial port is a virtual file, names start at /dev/ttys0 and count up. Under Windows is the same, but names start at COM1, so to open a serial port you should use to fopen( "/dev/tty0", "r" ) under ux and fopen( "COM1", "r" ) under win. Unfortunately fopen cant open COM ports in recent versions of Windows.

Not sure how it works with streams, so you may be able to use C++ streams, you just need to conditionaly compile device names; something like:


#include <iostream>
#include <fstream>

#ifdef WINDOWS
const char pnames[][12]={ "COM1", "COM2", "COM3", "COM4" };
#else
const char pnames[][12]={ "/dev/ttys0", "/dev/ttys1", "/dev/ttys2", "/dev/ttys3" };
#endif
...
...
...

std::ifstream ifs( pnames[port_number] );


Anyway, if you are just learning C, it could be a good exercise to create wrapper functions and conditionaly include calls to fopen, fread, fclose in your unix version and OpenFile, ReadFile and CloseHandle in your Windows version.

Restricted movement direction in LaserTowerOfDeath

When trying to move LaserTowerOfDeath the function tiltDown is receiving a value which is not using at all. Instead of that, it constantly moves 10 degrees down, and it is not possible to tilt up.
I think the function tiltDown should use the input value to modify tiltJointValue.

Current function:

bool LaserTowerOfDeathController::tiltDown(double value)
{
CD_INFO("\n");
if ( tiltJointValue > tiltRangeMin )
tiltJointValue-=tiltStep;
return sendCurrentJointValues();
}

It may be due to this commit:

ad83d1b

Set udev rules to avoid needing sudo

usb

In order to allow a non-sudoer to read data from the sensors connected via USB port, you need to add a rule for udev system.

Similar to the advice from debian udev documentation, create /etc/udev/rules.d/80-persistent-local-usb.rules with the following contents:

KERNEL == "ttyUSB0", MODE = "0777"

Another popular solution:

sudo usermod -a -G dialout $USER # Effect after reboot

gpio

http://wiringpi.com/wiringpi-update-to-2-29/ as commented at asrob-uc3m/hexakiller#6

note

Could be generated and installed

[RobotServer/FakeMotorController] dummy option always found

[RobotServer/FakeMotorController] dummy option always found, current develop (ec5f5a4), replicable via:

yarpdev --device FakeMotorController --verbose

Gets:

[info] DeviceDriverImpl.cpp:17 open(): Subdevice FakeMotorController
[debug] DeviceDriverImpl.cpp:12 open(): Got options: (device FakeMotorController) (dummy 123) (single_threaded 1) (subdevice FakeMotorController) (verbose)
[success] DeviceDriverImpl.cpp:16 open(): Got dummy option.
[INFO]created device <FakeMotorController>. See C++ class asrob::FakeMotorController for documentation.
yarp: Port /RobotServer/rpc:s active at tcp://163.117.150.234:10002/
[INFO]created wrapper <RobotServer>. See C++ class asrob::RobotServer for documentation.
===============================================================
== Options checked by device:
== 
device=FakeMotorController
RobotServer.subdevice=FakeMotorController
FakeMotorController.device=FakeMotorController
FakeMotorController.dummy
    check dummy option
RobotServer.name
==
===============================================================
yarp: Port /FakeMotorController/quit active at tcp://163.117.150.234:10003/
[INFO]device active in background...

Maybe related to roboticslab-uc3m/yarp-devices#175 ? (possibly not)

[RaspiOnePwmMotorController] rpio-pwm: Page 0 not present

Been getting lots of rpio-pwm: Page 0 not present with RaspiOnePwmMotorController.

Some help:

Seems like it's like that since Raspi v2, but had no issue because that was on https://github.com/asrob-uc3m/rd-ambassador that uses RaspiTwoPwmMotorController rather than RaspiOnePwmMotorController.

Merge IRobotManager moveForward/moveBackwards and similar pairs

From @jgvictores on December 13, 2017 22:5

Merge IRobotManager moveForward()/moveBackwards() and similar pairs?

Move, turn, pan, tilt all get (signed) ints as signature. Could be merged to reduce the functions.

PS: I'd go for double rather than int, and document units (e.g. attempt m/s rather than undocumented notion of percentage).

Copied from original issue: asrob-uc3m/robotDevastation-robots#42

Affects:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.