Repository containing the yarp plugins for blocktest.
Supported OS: Linux Ubuntu 18.10 and Windows 10. Boost library version must be >1.64.
sudo apt-get install -y cmake libboost-all-dev
YARP see https://github.com/robotology/yarp
Add in your bashrc:
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:/<build/install_dir_of_yarp>
Instead if you use robotology_superbuild in .bashrc:
export CMAKE_PREFIX_PATH=:${ROBOTOLOGY_SUPERBUILD_BUILD_DIR}/src/YARP
export ROBOTOLOGY_SUPERBUILD_INSTALL_DIR=<path to your robotology install dir>
source ${ROBOTOLOGY_SUPERBUILD_INSTALL_DIR}/share/robotology-superbuild/setup.sh
vcpkg install boost:x86-windows
YARP see https://github.com/robotology/yarp
In bash:
export blocktestcore_DIR=<path to your blocktest build dir>
In order to compile just execute the following commands in a bash terminal.
git clone https://github.com/robotology/blocktest-yarp-plugins
cd blocktest-yarp-plugins
mkdir build
cd build
ccmake ..
Make sure your CMAKE_INSTALL_PREFIX in ccmake is <path to your blocktest install dir>
Suggested location:
~\blocktest\install
Make sure your blocktestcore_DIR is <path to your blocktest build dir>
Suggested location:
~\blocktest\build
Then:
make -j 4
make install
These action blocks are contained in yarp blocktest plugin.
-
yarpreset
Reset the robot to the original frame position and pose.
<command name="yarpreset" repetitions="1" wait="0" reporterror="true"/>
-
yarpsendpwm
Send the pwm value to a specific jointname. Available options for pwm profile are:
sin
,const
orstepwave
.
If profile isconst
dutycycle is between -60 and +60 and frequency is not used. In this case, the pwm is provided as a constant value.
If profile issin
frequency is the sinusoid frequency.<command name="yarpsendpwm" profile="sin" frequency="1" dutycycle="20" time="20" jointname="L_AK_R" repetitions="1" wait="0" reporterror="true"/>
-
yarpsendposdirect
Send the position to a specific jointname
<command name="yarpsenddirectpos" jointname="L_AK_R" degree="-30" repetitions="1" wait="0" reporterror="true"/>
-
yarpsendpos
Send the position to a specific jointname using a minimum jerk trajectory.
<command name="yarpsendpos" jointname="L_AK_R" degree="0" velocity="20" repetitions="1" wait="0" reporterror="true"/>
-
yarpcheckrobot
<command name="checkRobot" repetitions="1" wait="0" reporterror="true"/>
Check if joints are present.
-
yarpcheckjointposition
Check if the joint position is correct.
<command name="yarpcheckjointposition" wrappername="/right_leg" jointname="r_ankle_pitch" tolerance="1" expectedvalue="15" repetitions="1" wait="0" reporterror="true"/>
-
yarpcheckrobotisvertical
Check if robot is vertical.
<command name="yarpcheckrobotisvertical" repetitions="1" wait="0" reporterror="true"/>
-
yarpsendpwmtrain
<command name="yarpsendpwmtrain" dutycycle="20" maxposition="20" minposition="-20" cycletime="10" cyclesleep="8" jointname="L_AK_R" repetitions="1" wait="0" reporterror="true"/>
Send a PWM train. Chenge PWM sign when the position is reached
-
applyforce
Apply wrench to the robot.
-
yarpcanwrite
<command library="yarp" name="yarpcanwrite" device="socketcan" messageid="0x011" data="0x17 0x00 0x00 0x00 0x00 0x00 0x00 0x00" candevicenum="0" canmyaddress="0" cantxtimeout="500" canrxtimeout="500" repetitions="1" wait="0" reporterror="true"></command>
Sends a CAN message trought
device
(socketcan available at the moment) . Sets the parameters for the driver. -
yarpcanread
<command library="yarp" name="yarpcanread" device="socketcan" messageid="0x011" checkdata="false" data="0xAA" candevicenum="0" canmyaddress="0" cantxtimeout="500" canrxtimeout="500" readtimeout="1000" repetitions="1" wait="0" reporterror="true"></command>
Receives a CAN message trought
device
(socketcan available at the moment) untilreadtimeout
is reached (milliseconds) . Sets the parameters for the driver. -
yarpopenpolydriver
<command library="yarp" name="yarpopenpolydriver" property="" polydrivertag="" repetitions="1" wait="0" reporterror="true"></command>
Open a polydriver using the property as in xml. The property must be in (key value) yarp format. The parameter polydrivertag is used for tagging the device in others block
-
yarpclosepolydriver
<command library="yarp" name="yarpclosepolydriver" property="" polydrivertag="" repetitions="1" wait="0" reporterror="true"></command>
Close a polydriver using the property as in xml. The property must be in (key value) yarp format. The parameter polydrivertag is used for tagging the device in others block
-
setvelocity
<command name="setVelocity" xvelocity="0.05" yvelocity="0.00001" repetitions="1" wait="0" reporterror="true"/>
The attributes xvelocity and yvelocity rapesent the velocity in that direction.
-
checkposition
<command name="checkPosition" xminposition="0.14" yminposition="0.13" zminposition="0.15" repetitions="1" wait="0" reporterror="true"/>
Check if joints are present.
-
preparestraightwalking
<command name="prepareStraightWalking" repetitions="1" wait="0" reporterror="true"/>
No params needed
-
startwalking
<command name="startWalking" repetitions="1" wait="0" reporterror="true"/>
No params needed
-
resetwalking
<command name="resetWalking" repetitions="1" wait="0" reporterror="true"/>
No params needed
If the robot position is less than xminposition,yminposition,zminposition the check fails. If the position is 0 it doesn't check on that axis. For now only the abs value of the position is checked.