Skip to content

Commit

Permalink
Initial testing of Paexo
Browse files Browse the repository at this point in the history
  • Loading branch information
yeshasvitirupachuri committed Jul 6, 2021
1 parent fbcc188 commit f7b5e29
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions devices/Paexo/conf/Paexo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<device type="serialport" name="SerialportDevice">
<param name="verbose"> 0 </param>
<!--param name="comport"> COM2 </param--> <!-- //windows -->
<param name="comport"> /dev/ttyACM2 </param> <!-- //linux -->
<param name="comport"> /dev/ttyACM0 </param> <!-- //linux -->
<param name="baudrate"> 115200 </param>
<param name="xonlim"> 0 </param>
<param name="xofflim"> 0 </param>
Expand Down Expand Up @@ -72,9 +72,9 @@
<action phase="shutdown" level="4" type="detach"/>
</device>

<!-- <device type="iwear_logger" name="ProducerLoggerDevice">
<device type="iwear_logger" name="ProducerLoggerDevice">
<param name="period">0.01</param>
<param name="LoggerLevel">(yarp)</param>
<param name="logAllQuantities">true</param>
<param name="logAccelerometers">false</param>
<param name="logEMGSensors">false</param>
Expand Down Expand Up @@ -107,6 +107,6 @@
</paramlist>
</action>
<action phase="shutdown" level="5" type="detach"/>
</device> -->
</device>

</robot>
8 changes: 4 additions & 4 deletions devices/Paexo/conf/paexo-validation-motor-control.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash
# set n to 1
min_motor_pos=27
max_motor_pos=55
min_motor_pos=30
max_motor_pos=50
step_size=2

## Paexo initialization
echo "start" | yarp rpc /wearable/paexo/rpc:i
sleep 0.5
echo "en_bc_data" | yarp rpc /wearable/paexo/rpc:i
sleep 0.5
echo "init:r" | yarp rpc /wearable/paexo/rpc:i
echo "init:l" | yarp rpc /wearable/paexo/rpc:i

# Set max position as initial motor position
current_pos=${max_motor_pos}
Expand All @@ -19,6 +19,6 @@ while [ ${min_motor_pos} -le ${current_pos} ]
do
read -s -n1 key
#sleep 0.1
echo "move:r:${current_pos}" | yarp rpc /wearable/paexo/rpc:i
echo "move:l:${current_pos}" | yarp rpc /wearable/paexo/rpc:i
current_pos=$((current_pos - step_size))
done
8 changes: 4 additions & 4 deletions devices/Paexo/test-application/paexo-test-application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

#include <thrift/WearableActuatorCommand.h>

#define MIN_MOTOR_POSITION 27
#define MAX_MOTOR_POSITION 55
#define MOTOR_STEP_SIZE 0.5 //Could go as low as 0.2
#define MIN_MOTOR_POSITION 30
#define MAX_MOTOR_POSITION 50
#define MOTOR_STEP_SIZE 2 //Could go as low as 0.2
using namespace yarp::os;
using namespace wearable;
using YarpBufferedPort = yarp::os::BufferedPort<yarp::os::Bottle>;
Expand Down Expand Up @@ -112,7 +112,7 @@ int main() {

port->write(true);

Time::delay(0.1);
Time::delay(0.5);

current_motor_position += MOTOR_STEP_SIZE;
}
Expand Down

0 comments on commit f7b5e29

Please sign in to comment.