Skip to content

Commit a7f9421

Browse files
author
Daniel M. Lofaro
committed
trying to get the wrists to work make sure to move the wrist form 2ch to 5ch in the code and in the table
1 parent c18f61c commit a7f9421

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

hubo-ach-install.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
./hubo-ach-safe-clean.sh
12
sudo mkdir /var/log/hubo/
23
sudo mkdir /var/lock/hubo/
34
./configure

hubo-ach-safe-clean.sh

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ sudo rm /etc/hubo-ach/joint.table
1010
sudo rm /etc/hubo-ach/sensor.table
1111
sudo rm /etc/hubo-ach/virtualHubo.py
1212
sudo rm /etc/hubo-ach/hubo-ach-safe-clean.sh
13+
sudo rm -R /etc/hubo-ach
1314
sudo rm $(locate libhuboparams.so | grep /usr)
1415
sudo rm $(locate hubo_ach.pyc | grep /usr)
1516
sudo rm $(locate hubo_ach.pyo | grep /usr)

src/hubo-daemon.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -839,15 +839,17 @@ void fSetEncRef(int jnt, hubo_state_t *s, hubo_param_t *h, struct can_frame *f)
839839
f->can_id = 0x01;
840840

841841

842-
unsigned long tempPulse = signConvention((int)getEncRef(jntW, s, h)); // RWY2
843-
unsigned long currentPulse = DrcSignConvention(tempPulse);
842+
//unsigned long tempPulse = signConvention((int)getEncRef(jntW, s, h)); // RWY2
843+
int tempPulse = (int)((double)getEncRef(jntW, s, h)/31.4); // RWY2
844+
//int tempPulse = 0;
845+
unsigned int currentPulse = DrcSignConvention(tempPulse);
844846
f->data[0] = (unsigned char)(currentPulse & 0x000000FF);
845847
f->data[1] = (unsigned char)( (currentPulse>>8) & 0x000000FF );
846848
f->data[2] = (unsigned char)( (currentPulse>>16) & 0x000000FF );
847849

848850
//short short_temp = (short)(Joint[RF2].RefVelCurrent); // gripping, referene current
849851
short short_temp = 0x0000; // gripping, referene current
850-
short short_currentPulse = DrcFingerSignConvention(short_temp, HUBO_FINGER_CURRENT_CTRL_MODE);
852+
unsigned short short_currentPulse = DrcFingerSignConvention(short_temp, HUBO_FINGER_CURRENT_CTRL_MODE);
851853
f->data[3] = (unsigned char)(short_currentPulse & 0x000000FF);
852854

853855
//short_temp = (short)(Joint[RF3].RefVelCurrent); //triggering, reference current
@@ -3012,7 +3014,7 @@ int main(int argc, char **argv) {
30123014
}
30133015
if(strcmp(argv[i], "-drc") == 0){
30143016
hubo_type = HUBO_ROBOT_TYPE_DRC_HUBO;
3015-
printf("DRC Hubo Type \n");
3017+
printf("DRC-Hubo Type \n");
30163018
}
30173019
i++;
30183020
}

tables/drc-hubo.joint.table

+10-10
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ LSY 0 0 1 1 100 4000 1 JM
1616
LEB 1 0 10 20 100 4000 1 JMC11 1 1 2 0
1717
LWY 0 0 1 1 100 4000 1 EJMC1 1 1 2 0
1818
LWP 1 0 1 2 100 4000 1 EJMC1 1 1 2 0
19-
LWR 2 0 1 1 100 4000 1 EJMC1 0 1 2 0
19+
LWR 0 0 1 2 100 4000 1 EJMC5 1 1 2 0
2020
RSP 0 0 10 25 100 4000 1 JMC8 1 1 2 0
2121
RSR 1 0 1 1 100 4000 1 JMC8 1 1 2 0
2222
RSY 0 0 1 1 100 4000 1 JMC9 1 1 2 0
2323
REB 1 0 10 20 100 4000 1 JMC9 1 1 2 0
2424
RWY 0 0 1 1 100 4000 1 EJMC0 1 1 2 0
2525
RWP 1 0 1 2 100 4000 1 EJMC0 1 1 2 0
26-
RWR 2 0 1 1 100 4000 1 EJMC0 0 1 2 0
26+
RWR 0 0 1 2 100 4000 1 EJMC4 1 1 2 0
2727
LHY 0 0 10 25 100 4000 1 JMC4 1 0 2 0
2828
LHR 1 0 324 1024 160 4000 1 JMC4 1 0 2 0
2929
LHP 0 0 16 20 160 4000 1 JMC5 1 0 1 0
@@ -36,13 +36,13 @@ RHP 0 0 16 20 160 4000 1 JM
3636
RKN 0 0 13 25 160 4000 1 JMC2 1 0 1 0
3737
RAP 0 0 10 25 100 4000 1 JMC3 1 0 2 0
3838
RAR 1 0 324 1024 100 4000 1 JMC3 1 0 2 0
39-
RF1 0 0 1 1 256 128 1 EJMC4 0 1 5 0
40-
RF2 1 0 1 1 256 128 1 EJMC4 0 1 5 0
41-
RF3 2 0 1 1 256 128 1 EJMC4 0 1 5 0
42-
RF4 3 0 1 1 256 128 1 EJMC4 0 1 5 0
39+
RF1 1 0 1 1 256 128 1 EJMC4 1 1 5 0
40+
RF2 2 0 1 1 256 128 1 EJMC4 1 1 5 0
41+
RF3 3 0 1 1 256 128 1 EJMC4 0 1 5 0
42+
RF4 4 0 1 1 256 128 1 EJMC4 0 1 5 0
4343
RF5 4 0 1 1 256 128 1 EJMC4 0 1 5 0
44-
LF1 0 0 1 1 256 128 1 EJMC5 0 1 5 0
45-
LF2 1 0 1 1 256 128 1 EJMC5 0 1 5 0
46-
LF3 2 0 1 1 256 128 1 EJMC5 0 1 5 0
47-
LF4 3 0 1 1 256 128 1 EJMC5 0 1 5 0
44+
LF1 1 0 1 1 256 128 1 EJMC5 1 1 5 0
45+
LF2 2 0 1 1 256 128 1 EJMC5 1 1 5 0
46+
LF3 3 0 1 1 256 128 1 EJMC5 0 1 5 0
47+
LF4 4 0 1 1 256 128 1 EJMC5 0 1 5 0
4848
LF5 4 0 1 1 256 128 1 EJMC5 0 1 5 0

0 commit comments

Comments
 (0)