Skip to content

Commit 6498a44

Browse files
committed
Merge branch 'master' of https://github.com/euslisp/jskeus into clear-open-list
2 parents 8297ea1 + 73e929f commit 6498a44

File tree

9 files changed

+66
-7
lines changed

9 files changed

+66
-7
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ ifneq ($(GCC_MACHINE),)
1414
ifeq ($(GCC_MACHINE),i686-linux-gnu)
1515
MACHINE=x86
1616
endif
17+
ifeq ($(GCC_MACHINE),aarch64-linux-gnu)
18+
MACHINE=aarch64
19+
endif
20+
ifeq ($(GCC_MACHINE),arm-linux-gnueabihf)
21+
MACHINE=arm
22+
endif
1723
endif
1824
ifeq ($(MACHINE),)
1925
MACHINE=$(shell uname -m)
@@ -26,7 +32,7 @@ ifeq ($(OS),Linux)
2632
export ARCHDIR=Linux64
2733
export MAKEFILE=Makefile.Linux64
2834
else
29-
ifneq (, $(findstring armv,$(MACHINE)))
35+
ifneq (, $(findstring arm,$(MACHINE)))
3036
export ARCHDIR=LinuxARM
3137
export MAKEFILE=Makefile.LinuxARM
3238
else ifneq (, $(findstring aarch,$(MACHINE)))

doc/irtmodel.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,9 +803,9 @@ \subsubsection{関節角度限界回避を含む逆運動学}
803803
\left\{
804804
\begin{array}{l l}
805805
1 + \left|\frac{\partial \bm{H}(\bm{\theta})}{\partial \theta_i}\right|
806-
& if \left|\frac{\partial \bm{H}(\bm{\theta})}{\partial
806+
& if \;\Delta\left|\frac{\partial \bm{H}(\bm{\theta})}{\partial
807807
\theta_i}\right| \geq 0 \\
808-
1 & if \left|\frac{\partial \bm{H}(\bm{\theta})}{\partial
808+
1 & if \;\Delta\left|\frac{\partial \bm{H}(\bm{\theta})}{\partial
809809
\theta_i}\right| < 0
810810
\end{array}
811811
\right.

doc/jmanual.dvi

1.88 KB
Binary file not shown.

doc/jmanual.pdf

471 Bytes
Binary file not shown.

irteus/Makefile.Linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ CXXFLAGS=$(CFLAGS)
7272
CFLAGS+= -g -falign-functions=4
7373
CXXFLAGS+=-g -falign-functions=4
7474

75-
ifeq ($(shell /bin/uname -m), x86_64)
75+
ifeq ($(shell gcc -dumpmachine), x86_64-linux-gnu)
7676
CC += -m32
7777
CXX += -m32
7878
LD += -m32

irteus/Makefile.LinuxARM

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ FFTW=-L/usr/local/lib -lfftw -lrfftw
6363

6464
SVNVERSION=\"$(shell git rev-parse --short HEAD)\"
6565

66-
MACHINE=$(shell uname -m | sed 's/\(armv[0-9]\).*/\1/')
66+
# gcc -dumpmachine retruns target triplet consists of three fields separated by a hyphen (-).
67+
MACHINE=$(shell gcc -dumpmachine | sed 's/\(.*\)-.*-.*/\1/')
6768
THREAD= -DTHREADED -DPTHREAD
6869

6970
CFLAGS=-O2 -D$(MACHINE) -D$(ARCH) -DLinux -DARM -D_REENTRANT -DGCC -I$(EUSDIR)/include $(THREAD) -DSVNVERSION=$(SVNVERSION) -fPIC

irteus/PQP/Makefile.Linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LPFX = lib
1010
LIBS = -L$(ARCHDIR) -lRAPID
1111

1212

13-
ifeq ($(shell /bin/uname -m), x86_64)
13+
ifeq ($(shell gcc -dumpmachine), x86_64-linux-gnu)
1414
CC += -m32
1515
LD += -m32
1616
EXELD += -m32

irteus/irtrobot.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@
594594
(find-if #'(lambda (l) (equal fs (car (send self l :force-sensors)))) '(:rleg :lleg)))
595595
(send self :force-sensors)))
596596
'(:rleg :lleg)))
597-
(force-sensors (mapcar #'(lambda (l) (send self :force-sensor l)) limbs))
597+
(force-sensors (mapcar #'(lambda (l) (car (send self l :force-sensors))) limbs))
598598
(cop-coords (mapcar #'(lambda (l) (send self l :end-coords)) limbs))
599599
(fz-thre 1e-3) ;; [N]
600600
(limb-cop-fz-list

irteus/test/test-irt-motion.l

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,57 @@
4040
(every #'identity zmp-cog-p)))
4141
'(:rleg :lleg :both))))
4242

43+
;; calc-zmp / calc-zmp-from-forces-moments
44+
(defun test-zmp-from-forces-moments (robot)
45+
(let (zmp-p1 zmp-p2)
46+
(labels ((calc-zmp-from-forces-moments
47+
()
48+
(let* ((torque-vector (send robot :torque-vector))
49+
(rleg-force-moment (v- (send robot :calc-force-from-joint-torque :rleg torque-vector)))
50+
(lleg-force-moment (v- (send robot :calc-force-from-joint-torque :lleg torque-vector))))
51+
(send robot :calc-zmp-from-forces-moments
52+
(list (subseq rleg-force-moment 0 3)
53+
(subseq lleg-force-moment 0 3))
54+
(list (subseq rleg-force-moment 3)
55+
(subseq lleg-force-moment 3))
56+
))))
57+
(objects (list robot))
58+
(send robot :newcoords (make-coords))
59+
(send robot :reset-pose)
60+
(send robot :arms :shoulder-p :joint-angle -45)
61+
(send robot :arms :elbow-p :joint-angle -45)
62+
(send robot :fix-leg-to-coords (make-coords) '(:rleg :lleg))
63+
(send *irtviewer* :look-all)
64+
;; calc-zmp
65+
(do ((mid -0.0 (+ mid 0.05)))
66+
((>= mid 1.1))
67+
;; calc-zmp
68+
(send robot :move-centroid-on-foot :both '(:rleg :lleg) :mid mid)
69+
(setq zmp-p1 (send robot :calc-zmp))
70+
;; calc-zmp-from-forces-moments
71+
(setq zmp-p2 (calc-zmp-from-forces-moments))
72+
;; draw centroid/zmp
73+
(warning-message 2 "centroid:~A zmp:~A / ~A~%" (send robot :centroid) zmp-p1 zmp-p2)
74+
(send *irtviewer* :draw-objects :flush nil)
75+
(send (send robot :centroid) :draw-on :flush nil :size 80 :color #f(0 0 1) :width 4)
76+
(send (transform #2f((1 0 0)(0 1 0)(0 0 0)) (send robot :centroid)) :draw-on :flush nil :size 80 :color #f(0 0 1) :width 4)
77+
(send zmp-p1 :draw-on :flush nil :size 150 :color #f(1 0 0) :width 2)
78+
(send zmp-p2 :draw-on :flush t :size 150 :color #f(1 1 0) :width 2)
79+
)
80+
81+
(warning-message 3 "check centroid is not equal to zmp~%")
82+
(warning-message 3 "centroid:~A zmp:~A / ~A~%" (send robot :centroid) zmp-p1 zmp-p2)
83+
(assert (not (eps-v= zmp-p1
84+
(transform #2f((1 0 0)(0 1 0)(0 0 0)) (send robot :centroid)))))
85+
(send robot :calc-zmp) (calc-zmp-from-forces-moments)
86+
(send robot :calc-zmp) (setq zmp-p2 (calc-zmp-from-forces-moments))
87+
(setq zmp-p1 (send robot :get :zmp))
88+
(warning-message 3 "check centroid is not equal to zmp after calling :calc-zmp~%")
89+
(warning-message 3 "centroid:~A zmp:~A / ~A~%" (send robot :centroid) zmp-p1 zmp-p2)
90+
(assert (eps-v= zmp-p1
91+
(transform #2f((1 0 0)(0 1 0)(0 0 0)) (send robot :centroid))))
92+
t)))
93+
4394
(defun init-pose-torque-tests
4495
(robot)
4596
(mapcar #'(lambda (jnt)
@@ -909,6 +960,7 @@
909960
(deftest test-irtdyna-samplerobot
910961
(warning-message 2 ";; run test-zmp-comomn~%")
911962
(assert (test-zmp-comomn *sample-robot*))
963+
(assert (test-zmp-from-forces-moments *sample-robot*))
912964
;; Not sure why, but it fails only COLLISION_LIB=PQP with source compile
913965
(unless (derivedp #'test-torque-from-its-own-weight-common compiled-code)
914966
(warning-message 2 ";; run test-torque-from-its-own-weight-common~%")

0 commit comments

Comments
 (0)