Difference between revisions of "YARP Motor Control"

From Wiki for iCub and Friends
Jump to: navigation, search
 
Line 1: Line 1:
 
== General Motor Control Reference ==
 
== General Motor Control Reference ==
 
* [[Motor control]] on the iCub robot example
 
* [[Motor control]] on the iCub robot example
* [http://eris.liralab.it/yarp/specs/dox/user/html/yarp_motor_control.html official tutorial] in YARP documentation
+
* [http://wiki.icub.org/yarp/specs/dox/user/html/yarp_motor_control.html official tutorial] in YARP documentation
  
 
== General Device Reference ==
 
== General Device Reference ==
 
There is general information on devices in YARP here:
 
There is general information on devices in YARP here:
* [http://eris.liralab.it/yarp/specs/dox/user/html/note_devices.html general approach to writing a device]
+
* [http://wiki.icub.org/yarp/specs/dox/user/html/note_devices.html general approach to writing a device]
* [http://eris.liralab.it/yarp/specs/dox/user/html/dev-how-to.html how to add a new device to the library]
+
* [http://wiki.icub.org/yarp/specs/dox/user/html/dev-how-to.html how to add a new device to the library]
* [http://eris.liralab.it/yarp/specs/dox/user/html/yarpdev.html yarpdev]
+
* [http://wiki.icub.org/yarp/specs/dox/user/html/yarpdev.html yarpdev]
* [http://eris.liralab.it/yarp/specs/dox/user/html/d9/d2c/group__dev__examples.html device invocation examples]
+
* [http://wiki.icub.org/yarp/specs/dox/user/html/d9/d2c/group__dev__examples.html device invocation examples]
  
 
== Making a new Motor Device ==
 
== Making a new Motor Device ==
Line 33: Line 33:
  
 
If you then want to make your device accessible to yarpdev, follow the steps in:
 
If you then want to make your device accessible to yarpdev, follow the steps in:
* [http://eris.liralab.it/yarp/specs/dox/user/html/dev-how-to.html how to add a new device to the library]
+
* [http://wiki.icub.org/yarp/specs/dox/user/html/dev-how-to.html how to add a new device to the library]
 
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!)
 
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!)
  

Latest revision as of 10:52, 20 June 2013

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:
 example/dev/fake_motor.cpp
  • 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://127.0.0.1:10002 (...)
 [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:
 example/dev/simple_motor_client.cpp
  • 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?