Skip to content

Commit 50a9ae8

Browse files
Merge branch 'master' into hrp2_with_3hand
2 parents 9eaf78a + 317c29c commit 50a9ae8

28 files changed

+1129
-218
lines changed

.github/workflows/config.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
7+
env:
8+
DISPLAY: '0:0'
9+
10+
jobs:
11+
linux:
12+
strategy:
13+
matrix:
14+
include:
15+
- DOCKER_IMAGE: ubuntu:trusty
16+
- DOCKER_IMAGE: ubuntu:xenial
17+
- DOCKER_IMAGE: ubuntu:bionic
18+
- DOCKER_IMAGE: ubuntu:bionic
19+
COLLISION_LIB: PQP
20+
- DOCKER_IMAGE: ubuntu:bionic
21+
COLLISION_LIB: BULLET
22+
- DOCKER_IMAGE: ubuntu:focal
23+
- DOCKER_IMAGE: debian:stretch
24+
- DOCKER_IMAGE: osrf/ubuntu_armhf:trusty
25+
- DOCKER_IMAGE: osrf/ubuntu_armhf:xenial
26+
- DOCKER_IMAGE: osrf/ubuntu_arm64:trusty
27+
- DOCKER_IMAGE: osrf/ubuntu_arm64:xenial
28+
- DOCKER_IMAGE: osrf/ubuntu_arm64:bionic
29+
- DOCKER_IMAGE: osrf/ubuntu_arm64:focal
30+
- DOCKER_IMAGE: osrf/debian_arm64:stretch
31+
fail-fast: false
32+
33+
runs-on: ubuntu-latest
34+
timeout-minutes: 90
35+
36+
name: linux
37+
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v2
41+
- name: Run test
42+
shell: bash
43+
run: |
44+
set -x
45+
export CI_SOURCE_PATH=$(pwd)
46+
export REPOSITORY_NAME=${PWD##*/}
47+
export TRAVIS_BRANCH=${GITHUB_REF#refs/heads/}
48+
export TRAVIS_OS_NAME=linux
49+
export DOCKER_IMAGE=${{matrix.DOCKER_IMAGE}}
50+
if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then sudo apt-get install -y -qq qemu-user-static git; fi
51+
echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
52+
docker run --rm -v $CI_SOURCE_PATH:$CI_SOURCE_PATH -e "DOCKER_IMAGE=$DOCKER_IMAGE" -e "COLLISION_LIB=$COLLISION_LIB" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"
53+
54+
doc:
55+
runs-on: ubuntu-latest
56+
timeout-minutes: 60
57+
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v2
61+
- name: Run test
62+
shell: bash
63+
run: |
64+
set -x
65+
sudo apt-get install -y -qq git make gcc g++ libjpeg-dev libxext-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libpq-dev libpng-dev xfonts-100dpi xfonts-75dpi pkg-config libbullet-dev
66+
make
67+
sudo apt-get install -y -qq texlive-binaries texlive-lang-cjk texlive-lang-japanese poppler-utils nkf latex2html
68+
(source bashrc.eus; cd doc/; make pdf)
69+
(source bashrc.eus; cd doc/; make html)
70+
71+
72+
osx:
73+
runs-on: macos-latest
74+
timeout-minutes: 60
75+
steps:
76+
- name: Checkout
77+
uses: actions/checkout@v2
78+
- name: Get brew cache directory
79+
id: brew-cache
80+
run: echo "::set-output name=dir::$(brew --cache)/downloads"
81+
- name: Brew cache
82+
uses: actions/cache@v2
83+
with:
84+
path: ${{ steps.brew-cache.outputs.dir }}
85+
key: ${{ runner.os }}-${{ hashFiles('.github/workflows/Brewfile') }}
86+
- name: Brew config
87+
run: |
88+
cd .github/workflows/
89+
brew config
90+
- name: Run test
91+
shell: bash
92+
run: |
93+
set -x
94+
export CI_SOURCE_PATH=$(pwd)
95+
export REPOSITORY_NAME=${PWD##*/}
96+
export TRAVIS_BRANCH=${GITHUB_REF#refs/heads/}
97+
export LC_CTYPE=C
98+
echo insecure >> ~/.curlrc
99+
export HOMEBREW_CURLRC=1
100+
HOMEBREW_NO_AUTO_UPDATE=1 brew install coreutils
101+
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
102+
# since macos-11, we need to install GL/gl.h
103+
HOMEBREW_NO_AUTO_UPDATE=1 brew install mesa-glu
104+
./.travis-osx.sh
105+
- name: Cleanup some brew downloads
106+
run: cd ${{ steps.brew-cache.outputs.dir }} && ls -lsS | head -n 10 | awk '{ print $10 }' | xargs rm -rf

.travis-osx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
travis_time_start() {
66
set +x
77
TRAVIS_START_TIME=$(gdate +%s%N)
8-
TRAVIS_TIME_ID=$(cat /dev/urandom | gtr -dc 'a-z0-9' | fold -w 8 | head -n 1)
8+
TRAVIS_TIME_ID=$(head /dev/urandom | base64 | head -c 8)
99
TRAVIS_FOLD_NAME=$1
1010
echo -e "\e[0Ktraivs_fold:start:$TRAVIS_FOLD_NAME"
1111
echo -e "\e[0Ktraivs_time:start:$TRAVIS_TIME_ID"

.travis.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ if [ "$(which sudo)" == "" ]; then apt-get update && apt-get install -y sudo; el
2525
travis_time_end
2626

2727
travis_time_start setup.apt-get_install
28+
# set non interactive tzdata https://stackoverflow.com/questions/8671308/non-interactive-method-for-dpkg-reconfigure-tzdata
29+
# set DEBIAN_FRONTEND=noninteractive
30+
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
31+
#
2832
sudo apt-get install -qq -y git make gcc g++ libjpeg-dev libxext-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libpq-dev libpng-dev xfonts-100dpi xfonts-75dpi pkg-config libbullet-dev # msttcorefonts could not install on 14.04 travis
2933
# sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils || echo "ok" # 16.04 does ont have ptex bin
3034
travis_time_end

CHANGELOG.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22
Changelog for package jskeus
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
1.2.5 (2021-12-01)
6+
------------------
7+
* copy gnuplotlib from euslib/jsk.l (`#261 <https://github.com/euslisp/jskeus/issues/261>`_)
8+
* [irtgeo.l] fix triangulation (`#585 <https://github.com/euslisp/jskeus/issues/585>`_)
9+
* [irtsensor.l] add :no-window arg in camera-model (`#588 <https://github.com/euslisp/jskeus/issues/588>`_)
10+
* [irtviewer.l] add irtviewer-no-window, irtviewer without xwindow (`#574 <https://github.com/euslisp/jskeus/issues/574>`_)
11+
* [irtgraph.l] do not set cost when arc is not costed-arc (`#603 <https://github.com/euslisp/jskeus/issues/603>`_)
12+
* .travise-osx.sh : osx 10.14-: fix for new libX11.dylib location (/opt/X11/lib:/opt/local/lib -> /usr/local/lib) (`#607 <https://github.com/euslisp/jskeus/issues/607>`_)
13+
* [irtutil.l] fix minjerk interpolation sometimes returns large acceleration (`#596 <https://github.com/euslisp/jskeus/issues/596>`_)
14+
* [demo/sample-robot-camera.l] add sample-robot-camera.l : demo to manipulatie camera model (:ray, :screen-point) (`#597 <https://github.com/euslisp/jskeus/issues/597>`_)
15+
* [irtcollada.l] fix irtcollada problem that mesh poses are incorrect if root link is moved from origin (`#600 <https://github.com/euslisp/jskeus/issues/600>`_)
16+
* [irtmath.l] add comment to quaternion (`#589 <https://github.com/euslisp/jskeus/issues/589>`_)
17+
* doc/conf.py: download deb archive.ubuntu.com manually (`#581 <https://github.com/euslisp/jskeus/issues/581>`_)
18+
19+
* Contributors: Kei Okada, Naoki Hiraoka, Naoya Yamaguchi, Shingo Kitagawa, Yohei Kakiuchi
20+
521
1.2.4 (2020-07-03)
622
------------------
723
* fix for debian release

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ copy_eus_tex:
2222
(cd ${TMPDIR};for x in fig/*.jpg; do extractbb $$x; done) # workaround for https://github.com/backtracking/bibtex2html/issues/9
2323
cp *.tex ${TMPDIR}
2424
platex --version | grep utf8 || nkf --in-place -e ${TMPDIR}/*.tex
25-
for x in irtrobot irtmodel irtsensor irtscene irtdyna irtgeo irtgl irtutil irtviewer irtx irtmath irtbvh irtcollada irtgraph irtimage irtpointcloud png irtcollision pqp bullet; do\
25+
for x in irtrobot irtmodel irtsensor irtscene irtdyna irtgeo irtgl irtutil irtviewer irtx irtmath irtbvh irtcollada irtgraph gnuplotlib irtimage irtpointcloud png irtcollision pqp bullet; do\
2626
irteusgl ../eus/lib/llib/documentation.l "(make-document \"../irteus/$$x.l\" \"${TMPDIR}/$$x-func.tex\")" "(exit)"; \
2727
done
2828

doc/irtext.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ \section{irteus拡張}
44
\input{irtx-func}
55
\subsection{ユーティリティ関数}
66
\input{irtutil-func}
7+
\input{gnuplotlib-func}
78
\subsection{数学関数}
89
\input{irtmath-func}
910
\subsection{画像関数}

doc/jmanual.dvi

4.83 KB
Binary file not shown.

doc/jmanual.pdf

2.42 KB
Binary file not shown.

irteus/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ endif
9191
MODULES.L=irt_modules.l
9292
EUSLIB_MODULES.L=$(addprefix $(EUSDIR)/lib/,$(MODULES.L))
9393

94-
IRTEUS=irtmath irtutil irtgraph pgsql time
94+
IRTEUS=irtmath irtutil irtgraph gnuplotlib pgsql time
9595
IRTEUSG=irtgeo pqp bullet irtcollision irtscene irtmodel irtsensor irtdyna irtrobot irtbvh irtcollada irtpointcloud irtstl irtwrl
9696
IRTEUSX=irtx
9797
IRTEUSIMG=irtimage eusjpeg png
@@ -261,6 +261,7 @@ $(INSTALLOBJDIR)/irtglrgb.$(OSFX): irtglrgb.l
261261
$(INSTALLOBJDIR)/irtviewer.$(OSFX): irtviewer.l
262262
$(INSTALLOBJDIR)/irtimage.$(OSFX): irtimage.l
263263
$(INSTALLOBJDIR)/irtcollision.$(OSFX): irtcollision.l
264+
$(INSTALLOBJDIR)/gnuplotlib.$(OSFX): gnuplotlib.l
264265
$(INSTALLOBJDIR)/pqp.$(OSFX): pqp.l
265266
$(INSTALLOBJDIR)/bullet.$(OSFX): bullet.l
266267
$(INSTALLOBJDIR)/png.$(OSFX): png.l

irteus/compile_irt.l

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
(comp:compile-file-if-src-newer "irtmath.l" *objdir*)
5252
(comp:compile-file-if-src-newer "irtutil.l" *objdir*)
5353
(comp:compile-file-if-src-newer "irtgraph.l" *objdir*)
54+
(comp:compile-file-if-src-newer "gnuplotlib.l" *objdir*)
5455

5556
(defun comp::compile-llib-file-if-src-newer (fname)
5657
(print (list 'compile fname))

irteus/demo/sample-robot-camera.l

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2+
;;;
3+
;;; Copyright (c) 1987- JSK, The University of Tokyo. All Rights Reserved.
4+
;;;
5+
;;; This software is a collection of EusLisp code for robot applications,
6+
;;; which has been developed by the JSK Laboratory for the IRT project.
7+
;;; For more information on EusLisp and its application to the robotics,
8+
;;; please refer to the following papers.
9+
;;;
10+
;;; Toshihiro Matsui
11+
;;; Multithread object-oriented language euslisp for parallel and
12+
;;; asynchronous programming in robotics
13+
;;; Workshop on Concurrent Object-based Systems,
14+
;;; IEEE 6th Symposium on Parallel and Distributed Processing, 1994
15+
;;;
16+
;;; Redistribution and use in source and binary forms, with or without
17+
;;; modification, are permitted provided that the following conditions are met:
18+
;;;
19+
;;; * Redistributions of source code must retain the above copyright notice,
20+
;;; this list of conditions and the following disclaimer.
21+
;;; * Redistributions in binary form must reproduce the above copyright notice,
22+
;;; this list of conditions and the following disclaimer in the documentation
23+
;;; and/or other materials provided with the distribution.
24+
;;; * Neither the name of JSK Robotics Laboratory, The University of Tokyo
25+
;;; (JSK) nor the names of its contributors may be used to endorse or promote
26+
;;; products derived from this software without specific prior written
27+
;;; permission.
28+
;;;
29+
;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
30+
;;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
31+
;;; THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32+
;;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
33+
;;; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
34+
;;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
35+
;;; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
36+
;;; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
37+
;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
38+
;;; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
39+
;;; ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40+
;;;
41+
42+
(load "sample-robot-model.l")
43+
44+
(defun robot-camera-settings ()
45+
(unless (boundp '*robot*)
46+
(setq *robot* (instance sample-robot :init)))
47+
(send *robot* :reset-pose)
48+
(send *robot* :arms :shoulder-p :joint-angle -30)
49+
(send *robot* :arms :shoulder-r :joint-angle 30)
50+
(send *robot* :arms :shoulder-y :joint-angle 30)
51+
(send *robot* :arms :elbow-p :joint-angle -60)
52+
(send *robot* :fix-leg-to-coords (make-coords))
53+
(send *robot* :look-at-hand :larm)
54+
(send *robot* :larm :gripper :joint-angle 60)
55+
(setq *table* (make-cube 800 1200 5 :pos #f(800 0 500))) (send *table* :set-color :white)
56+
(setq *ray-target* (make-sphere 20)) (send *ray-target* :set-color :blue)
57+
(setq *tabletop-target* (make-cylinder 15 200)) (send *tabletop-target* :set-color :green)
58+
(objects (list *robot* *ray-target* *tabletop-target* *table*))
59+
(setq *camera* (send *robot* :camera "left-camera"))
60+
(if (not (boundp '*camera-view*))
61+
(setq *camera-view* (send *camera* :create-viewer)))
62+
)
63+
64+
(defun robot-camera-demo ()
65+
(let ((uv-list nil)
66+
(images))
67+
(dotimes (i 30)
68+
;; move robot head
69+
(send *robot* :head :neck-y :joint-angle -2 :relative t)
70+
(send *robot* :head :neck-p :joint-angle 0.4 :relative t)
71+
;; camera/screen operations
72+
;; : screen-point ;; "Returns point in screen corresponds to the given pos."
73+
(setq uv (send *camera* :screen-point (send *robot* :larm :end-coords :worldpos)))
74+
;; : "Returns ray vector of given x and y."
75+
(setq ray (send *camera* :ray 240 120)) ;; "Returns ray vector of given x and y."
76+
(setq ray-line (make-line (send *camera* :worldpos) (v+ (send *camera* :worldpos) (scale 1000 ray))))
77+
(send *ray-target* :locate (v+ (send *camera* :worldpos) (scale 1000 ray)) :world)
78+
;; calc intersection of table and ray-line
79+
(setq face-top (send *table* :face 1))
80+
(setq intersect-param (send face-top :intersection (send ray-line :pvertex) (send ray-line :nvertex)))
81+
(send *tabletop-target* :locate (send ray-line :point intersect-param) :world)
82+
;; draw 3d info
83+
(send *camera* :draw-objects (list *robot* *ray-target* *tabletop-target*))
84+
(send *irtviewer* :draw-objects :flush nil)
85+
(send *camera-view* :viewsurface :makecurrent) ;; point-size requre this
86+
;; draw camera/screen operations
87+
;; :screen-point
88+
(send *camera-view* :viewsurface :point-size 10)
89+
(send *camera-view* :viewsurface :color #f(1 0 0))
90+
(send *camera-view* :viewsurface :draw-point uv)
91+
;; draw history of :screen-point
92+
(send *camera-view* :viewsurface :point-size 2)
93+
(dolist (tmp-uv uv-list) (send *camera-view* :viewsurface :draw-point tmp-uv))
94+
(send *camera-view* :viewsurface :color #f(1 1 1))
95+
(send *camera-view* :viewsurface :string (elt uv 0) (elt uv 1) (format nil "larm ~A" uv))
96+
(push uv uv-list)
97+
;; :ray
98+
(send *camera-view* :viewsurface :point-size 10)
99+
(send *camera-view* :viewsurface :color #f(1 1 1))
100+
(send *camera-view* :viewsurface :draw-point #f(240 120)) ; see *camera* :ray for #f(240 120)
101+
(send *camera-view* :viewsurface :string 480 120 "ray point")
102+
;; :3d-point
103+
;; draw sensor/kinematics info
104+
(send *irtviewer* :viewer :viewsurface :makecurrent)
105+
(send ray-line :draw-on :flush nil :color #f(0 0 1) :width 5)
106+
(send *camera* :draw-on :flush nil)
107+
(send *robot* :larm :end-coords :draw-on :flush t)
108+
;; flush
109+
(send *camera-view* :viewsurface :flush)
110+
(push (send *camera* :get-image) images)
111+
(send *irtviewer* :viewer :viewsurface :flush)
112+
(x::window-main-one)
113+
)
114+
(x::make-animgif-from-images "sample-robot-camera-gif" (nreverse images))
115+
))
116+
117+
(robot-camera-settings)
118+
(send *irtviewer* :logging :clear)
119+
(send *irtviewer* :logging :start)
120+
(robot-camera-demo)
121+
(send *irtviewer* :logging :stop)
122+
(send *irtviewer* :save-animgif :fname "robot-camera-demo.gif")
123+
124+
;;
125+
(format t ";; demo to manipulatie camera model (:ray, :screen-point)~%")
126+

irteus/demo/walk-motion.l

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,30 @@
329329
tm-list (reverse zmp-list) (reverse cog-list) (reverse ref-zmp-list2))
330330
)
331331
(unless (or (null x::*display*) (= x::*display* 0))
332+
;; graph-view
333+
(graph-view (list (reverse zmp-list) (reverse cog-list) (reverse ref-zmp-list2)) tm-list
334+
:xlabel "Time [s]" :ylabel "ZMP X [mm]"
335+
:keylist '("card zmp" "cog" "refmp"))
336+
;; online-version
337+
(setq *gnuplot* (gnuplot))
338+
(send *gnuplot* :proc-length (length tm-list))
339+
(mapcar #'(lambda (tm zmp cog refzmp)
340+
(send *gnuplot* :proc-one (list zmp cog refzmp)
341+
:direction :left
342+
:title '("cart zmp" "cog" "refzmp")
343+
))
344+
tm-list (reverse zmp-list) (reverse cog-list) (reverse ref-zmp-list2))
345+
;; raw-command version
332346
(let ((gp-command-list (list
333347
"set xlabel 'Time [s]';"
334348
"set ylabel 'ZMP X [mm]';"
335349
"plot '/tmp/test-preview-control-data.dat' using 1:2 title 'cart zmp' with lines;"
336350
"replot '/tmp/test-preview-control-data.dat' using 1:3 title 'cog' with lines;"
337351
"replot '/tmp/test-preview-control-data.dat' using 1:4 title 'refzmp' with lines;"
338352
"pause -1;")))
339-
(unix:system (format nil "gnuplot -e \"~A\""
340-
(let ((str "")) (dolist (gpc gp-command-list) (setq str (format nil "~A ~A" str gpc))) str)))))
353+
(setq *g* (gnuplot))
354+
(send *g* :command (apply #'concatenate string gp-command-list))
355+
))
341356
(mapcar #'(lambda (tm zmp cog refzmp)
342357
(list :time tm :zmp zmp :cog cog :refzmp refzmp))
343358
tm-list (reverse zmp-list) (reverse cog-list) (reverse ref-zmp-list2))
@@ -380,8 +395,9 @@
380395
"replot '/tmp/test-preview-control-data.dat' using 1:3 title 'cog' with lines;"
381396
"replot '/tmp/test-preview-control-data.dat' using 1:4 title 'refzmp' with lines;"
382397
"pause -1;")))
383-
(unix:system (format nil "gnuplot -e \"~A\""
384-
(let ((str "")) (dolist (gpc gp-command-list) (setq str (format nil "~A ~A" str gpc))) str)))))
398+
(setq *g* (gnuplot))
399+
(send *g* :command (apply #'concatenate string gp-command-list))
400+
))
385401
(mapcar #'(lambda (tm zmp cog refzmp)
386402
(list :time tm :zmp zmp :cog cog :refzmp refzmp))
387403
tm-list (reverse zmp-list) (reverse cog-list) (reverse ref-zmp-list2))
@@ -433,8 +449,9 @@
433449
"replot '/tmp/test-preview-control-data.dat' using 1:3 title 'cog' with lines;"
434450
"replot '/tmp/test-preview-control-data.dat' using 1:4 title 'refzmp' with lines;"
435451
"pause -1;")))
436-
(unix:system (format nil "gnuplot -e \"~A\""
437-
(let ((str "")) (dolist (gpc gp-command-list) (setq str (format nil "~A ~A" str gpc))) str)))))
452+
(setq *g* (gnuplot))
453+
(send *g* :command (apply #'concatenate string gp-command-list))
454+
))
438455
(mapcar #'(lambda (tm zmp cog refzmp)
439456
(list :time tm :zmp zmp :cog cog :refzmp refzmp))
440457
tm-list (reverse zmp-list) (reverse cog-list) (reverse ref-zmp-list2))
@@ -479,8 +496,9 @@
479496
"replot '/tmp/test-preview-control-data.dat' using 1:3 title 'cog' with lines;"
480497
"replot '/tmp/test-preview-control-data.dat' using 1:4 title 'refzmp' with lines;"
481498
"pause -1;")))
482-
(unix:system (format nil "gnuplot -e \"~A\""
483-
(let ((str "")) (dolist (gpc gp-command-list) (setq str (format nil "~A ~A" str gpc))) str)))))
499+
(setq *g* (gnuplot))
500+
(send *g* :command (apply #'concatenate string gp-command-list))
501+
))
484502
(mapcar #'(lambda (tm zmp cog refzmp)
485503
(list :time tm :zmp zmp :cog cog :refzmp refzmp))
486504
tm-list (reverse zmp-list) (reverse cog-list) (reverse ref-zmp-list2))
@@ -534,8 +552,9 @@
534552
"replot '/tmp/test-preview-control-data-2.dat' using 1:4 title 'output cog' with lines;"
535553
"replot '/tmp/test-preview-control-data-2.dat' using 1:5 title 'input cog' with lines;"
536554
"pause -1;")))
537-
(unix:system (format nil "gnuplot -e \"~A\""
538-
(let ((str "")) (dolist (gpc gp-command-list) (setq str (format nil "~A ~A" str gpc))) str)))))
555+
(setq *g* (gnuplot))
556+
(send *g* :command (apply #'concatenate string gp-command-list))
557+
))
539558
data
540559
)))
541560

0 commit comments

Comments
 (0)