YARP Motor Control

From Wiki for iCub and Friends
Revision as of 10:52, 20 June 2013 by Daniele.Domenichelli@iit.it (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

General Motor Control Reference

General Device Reference

There is general information on devices in YARP here:

Making a new Motor Device

Useful things to know:

  • In recent versions of YARP, there's an example of making a new motor device at:
  • In recent versions of YARP, there's a "test" motor device called "test_motor":
 yarpdev --device test_motor --name /fakebot/head --axes 8
  • If you start the test_motor running, you can test it using remote procedure calls from the command line like this:
 $ yarp rpc /fakebot/head/rpc:i
 RPC connection to /fakebot/head/rpc:i at tcp:// (...)
 [get] [axes]
 Response: [is] [axes] 8 [ok]
 [set] [pos] 4 5.0
 Response: [ok]
 [get] [encs]
 Response: [is] [encs] (0.0 0.0 0.0 0.0 5.0 0.0 0.0 0.0) [ok]
  • How can you know what commands are available? You can try using the simple motor client in YARP CVS in:
  • For programmatic use of your motor device, see either the fake_motor.cpp example or the simple_motor_client.cpp example.
  • Real motor devices currently in YARP are "esd" and "jrkerr".

For most people so far, the first step has been to make a position control interface. In YARP, that is "yarp::dev::IPositionControl". Again, the fake_motor.cpp example is a good reference. The "yarp::dev::ImplementPositionControl" class can be helpful - just make sure you call the initialize method.

If you then want to make your device accessible to yarpdev, follow the steps in:

This is not a required step, but is important if you plan on feeding your device back to the YARP repository (which we would be very happy with!)

List of known motor devices

  • ESD - in YARP repository (source: LIRA-Lab, Genoa)
  • Jrkerr - in YARP repository (source: IST, Lisbon)
  • Dimax U2C-12 -- University of Hertfordshire
  • Chris?