Motor babbling with the iCub Version:1.0.
More...
Motor babbling with the iCub Version:1.0.
- Author
- Martina Zambelli m.zam.nosp@m.bell.nosp@m.i13@i.nosp@m.mper.nosp@m.ial.a.nosp@m.c.uk
- Copyright
- Released under the terms of the GNU GPL v2.0
Description
A module to issue pseudo random (sinusoids) commands to the iCub (either several joints, or individual joints)
Parameters
- –name: To specify the module's name; all the open ports will be tagged with the prefix /name
- –robot: To specify the robot's name
- –single_joint: To specify whether a single joint should be used for babbling. If >=0, the indicated joint will be used. If -1, multiple joints will be used.
- –start_position::head: Where should the head be pointed during babbling
- –start_position::arm: Start joint configuration for arm when doing the babbling
- –babbling_param::freq: Frequency used for sinusoids
- –babbling_param::amp: Amplitude used for sinusoids
- –babbling_param::duration: Time duration for babbling
Input Ports
- /babbling/rpc [yarp::sig::Bottle] [default carrier:tcp]: Response port. Supported commands:
- help
- quit
- babbling arm left/right [duration]
- babbling hand left/right
- babbling joint joint_number left/right [duration]
Output Ports
Services
◆ Babbling
Definition at line 28 of file babbling.h.
◆ babblingCommands()
void Babbling::babblingCommands |
( |
double & |
t, |
|
|
int |
j_idx |
|
) |
| |
|
protected |
Issues the actual velocity commands for time t
.
- Parameters
-
t | - time to be used for the sin wave |
j_idx | - if -1, do whole arm / whole hand babbling, otherwise babble single joint |
Definition at line 281 of file babbling.cpp.
◆ close()
◆ configure()
bool Babbling::configure |
( |
yarp::os::ResourceFinder & |
rf | ) |
|
◆ doBabbling()
bool Babbling::doBabbling |
( |
| ) |
|
|
protected |
Sets the joints to be in velocity control, then goes in a loop to call babblingCommands
for duration
seconds.
- Returns
- True if successful, false if not
Definition at line 244 of file babbling.cpp.
◆ getPeriod()
double Babbling::getPeriod |
( |
| ) |
|
◆ gotoStartPos()
bool Babbling::gotoStartPos |
( |
| ) |
|
|
protected |
Move head + arm in start position.
- Returns
- true if successful
Definition at line 372 of file babbling.cpp.
◆ init_iCub()
bool Babbling::init_iCub |
( |
| ) |
|
|
protected |
Initializes all the device controllers.
- Returns
- True if successful
Definition at line 538 of file babbling.cpp.
◆ init_left_arm()
bool Babbling::init_left_arm |
( |
| ) |
|
|
protected |
Create PolyDriver for left arm.
Definition at line 425 of file babbling.cpp.
◆ init_right_arm()
bool Babbling::init_right_arm |
( |
| ) |
|
|
protected |
Create PolyDriver for left arm.
Definition at line 481 of file babbling.cpp.
◆ interruptModule()
bool Babbling::interruptModule |
( |
| ) |
|
◆ moveHeadToStartPos()
bool Babbling::moveHeadToStartPos |
( |
| ) |
|
|
protected |
Use iGazeController to move head in start position.
- Returns
- true if successful
Definition at line 364 of file babbling.cpp.
◆ respond()
bool Babbling::respond |
( |
const yarp::os::Bottle & |
command, |
|
|
yarp::os::Bottle & |
reply |
|
) |
| |
◆ updateModule()
bool Babbling::updateModule |
( |
| ) |
|
◆ amp
Amplitude for sin wave.
Definition at line 60 of file babbling.h.
◆ duration
double Babbling::duration |
|
protected |
Duration for the babbling.
Definition at line 61 of file babbling.h.
◆ encodersLeftArm
yarp::sig::VectorOf<double> Babbling::encodersLeftArm |
|
protected |
◆ encodersRightArm
yarp::sig::VectorOf<double> Babbling::encodersRightArm |
|
protected |
◆ encsLeftArm
yarp::dev::IEncoders* Babbling::encsLeftArm |
|
protected |
◆ encsRightArm
yarp::dev::IEncoders* Babbling::encsRightArm |
|
protected |
◆ freq
Frequency for sin wave.
Definition at line 59 of file babbling.h.
◆ handlerPort
yarp::os::RpcServer Babbling::handlerPort |
|
protected |
◆ headDev
yarp::dev::PolyDriver Babbling::headDev |
|
protected |
◆ ictrlLeftArm
yarp::dev::IControlMode* Babbling::ictrlLeftArm |
|
protected |
◆ ictrlLimLeftArm
yarp::dev::IControlLimits* Babbling::ictrlLimLeftArm |
|
protected |
◆ ictrlLimRightArm
yarp::dev::IControlLimits* Babbling::ictrlLimRightArm |
|
protected |
◆ ictrlRightArm
yarp::dev::IControlMode* Babbling::ictrlRightArm |
|
protected |
◆ igaze
yarp::dev::IGazeControl* Babbling::igaze |
|
protected |
◆ itrqLeftArm
yarp::dev::ITorqueControl* Babbling::itrqLeftArm |
|
protected |
◆ itrqRightArm
yarp::dev::ITorqueControl* Babbling::itrqRightArm |
|
protected |
◆ leftArmDev
yarp::dev::PolyDriver Babbling::leftArmDev |
|
protected |
◆ part
std::string Babbling::part |
|
protected |
Should be "left_arm" or "right_arm".
Definition at line 54 of file babbling.h.
◆ part_babbling
std::string Babbling::part_babbling |
|
protected |
Whether to do babbling with the whole "arm" or "hand" (should be either one or the other)
Definition at line 56 of file babbling.h.
◆ posLeftArm
yarp::dev::IPositionControl* Babbling::posLeftArm |
|
protected |
◆ posRightArm
yarp::dev::IPositionControl* Babbling::posRightArm |
|
protected |
◆ rightArmDev
yarp::dev::PolyDriver Babbling::rightArmDev |
|
protected |
◆ robot
std::string Babbling::robot |
|
protected |
Should be "icub" or "icubSim".
Definition at line 55 of file babbling.h.
◆ single_joint
int Babbling::single_joint |
|
protected |
Which joint to do babbling with in case it is a single joint.
Definition at line 57 of file babbling.h.
◆ start_command_arm
double Babbling::start_command_arm[16] |
|
protected |
Start command for the 16 arm joints.
Definition at line 63 of file babbling.h.
◆ start_command_head
yarp::sig::VectorOf<double> Babbling::start_command_head |
|
protected |
Target for head in start position.
Definition at line 64 of file babbling.h.
◆ velLeftArm
yarp::dev::IVelocityControl* Babbling::velLeftArm |
|
protected |
◆ velRightArm
yarp::dev::IVelocityControl* Babbling::velRightArm |
|
protected |