Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

English Manual Added #629

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 27 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![Join the chat at https://gitter.im/euslisp/jskeus](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/euslisp/jskeus?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)


This repository contains software developed and used by [JSK](http://www.jsk.t.u-tokyo.ac.jp) at The University of Tokyo.

## 1. Getting started
Expand All @@ -12,30 +11,35 @@ This repository contains software developed and used by [JSK](http://www.jsk.t.u
#### 1.1.1 Setup ROS repository

Please set `ROS_DISTRO` environment variable to your ROS distro. For example, if you use 18.04, run `export ROS_DISTRO=melodic`.

```
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
sudo apt-get update
```

#### 1.1.2 Install Euslisp

```
sudo apt-get install ros-$ROS_DISTRO-euslisp
```

### 1.2 Install via Homebrew (OSX)

```
brew install euslisp/jskeus/jskeus
```

## 2 Playing with Demo programs

### 2.1 Motion generation

```
$ irteusgl irteus/demo/demo.l
```
and type any command, such as '(crank-motion)' or '(dual-arm-ik)'

and type any command, such as '(crank-motion)' or '(dual-arm-ik)'

[![full-body-ik](images/Full-body-ik.png)](https://github.com/euslisp/jskeus/blob/master/irteus/demo/full-body-ik.l)
[![dual-arm-ik](images/Dual-arm-ik.png)](https://github.com/euslisp/jskeus/blob/master/irteus/demo/dual-arm-ik.l)
Expand All @@ -47,14 +51,17 @@ and type any command, such as '(crank-motion)' or '(dual-arm-ik)'
[![null-space-ik](images/Null-space-ik.png)](https://github.com/euslisp/jskeus/blob/master/irteus/demo/null-space-ik.l)

### 2.2 Robots and objects models

```
$ irteusgl models/irt-all-robots.l "(make-all-robots)"
```

![all robots](images/irt-all-robots.png)

```
$ irteusgl models/irt-all-objects.l "(make-all-objects)"
```

![all objects](images/irt-all-objects.png)

## 3 Getting started for ROS and PR2 users
Expand All @@ -64,12 +71,14 @@ $ irteusgl models/irt-all-objects.l "(make-all-objects)"
#### 3.1.1 Setup ROS repository

You can skip this procedure if you have already setup your ROS system

```
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
sudo apt-get update
```

#### 3.1.2 Install pr2/euslisp programs

```
Expand All @@ -79,6 +88,7 @@ sudo apt-get install ros-$ROS_DISTRO-pr2eus
### 3.3 Running demo programs

#### 3.3.1 Visualization of pr2 robot

```
$ rosrun euscollada pr2.sh
```
Expand All @@ -97,7 +107,8 @@ $ roslaunch ./pr2-read-state.launch
$ roslaunch ./pr2-send-joints.launch
```

You can use our script to set `ROS_MASTER_URI` and `ROS_IP`
You can use our script to set `ROS_MASTER_URI` and `ROS_IP`

```
$ source `rospack find jsk_tools`/src/bashrc.ros
$ rossetrobot pr1012.jsk.com # change to your environment
Expand All @@ -107,32 +118,35 @@ $ rossetip

![./pr2-read-state.launch](images/Pr2-read-state.png)


Have a look at roseus package in http://github.com/jsk-ros-pkg repository for ROS client library for euslisp

### 3.4 Support and Trouble Shooting


Open an issue on our [issue tracker](https://github.com/euslisp/jskeus/issues) if something doesn't work as expected, or if you want new features implemented.

Use the [pull requests](https://github.com/euslisp/jskeus/pulls) system to send us solutions for the issues so we can implement them in this repository.

### 3.5 Online Documents (Currently only Japanese is available)
### 3.5 Online Documents

See online [manual](http://euslisp.github.io/jskeus/)

PDF files are also available from [here](https://github.com/euslisp/jskeus/raw/master/doc/jmanual.pdf)
PDF files are also available below:

- [日本語](https://github.com/euslisp/jskeus/raw/master/doc/jmanual.pdf)
- [english](https://github.com/euslisp/jskeus/raw/master/doc/manual.pdf)

### 3.6 Install euslisp from source code (EXPERTS ONLY)
### 3.6 Install euslisp from source code (EXPERTS ONLY)

#### 3.6.1 Installing dependent libraries

For Ubuntu users:

```
$ sudo apt-get install git make gcc g++ libjpeg-dev libxext-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libpq-dev libpng12-dev xfonts-100dpi xfonts-75dpi gsfonts-x11 texlive-fonts-extra xfonts-100dpi-transcoded xfonts-75dpi-transcoded msttcorefonts pkg-config libbullet-dev
```

For Mac OSX users using Homebrew:

```
$ brew install jpeg libpng mesalib-glw wget bullet
```
Expand All @@ -144,14 +158,16 @@ Also for Mac OSX lion (or older) users it's better to install the latest XQuartz

(If XQuartz is older than 2.7.3, the installation of EusLisp will fail. You should install the latest XQuartz.)


For Raspberry Pi users using debian(Raspbian "wheezy"):

```
$ sudo apt-get install git gcc g++ libjpeg62-dev libxext-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libpq-dev libpng12-dev xfonts-100dpi xfonts-75dpi
## additional install for using OpenGL on raspberry pi
$ sudo apt-get install libgl1-mesa-dri xserver-xorg-video-vesa xutils
```

For Cygwin(only works with 32bit systems)

```
Packages listed below should be intalled using setup.exe.

Expand All @@ -165,6 +181,7 @@ bitmap fonts (all bitmap font packages -75dpi, -100dpi, -misc )
```

#### 3.6.2 Downloading and building EusLisp

```
$ git clone http://github.com/euslisp/jskeus jskeus
$ cd jskeus
Expand All @@ -173,7 +190,7 @@ you will see instructions to add EUSDIR, ARCHDIR, PATH, LD_LIBRARY_PATH environm
$ echo "source ~/bashrc.eus" >> ~/.bashrc
```

#### 3.6.3 Install ROS and jsk-ros-pkg repository
#### 3.6.3 Install ROS and jsk-ros-pkg repository

See http://wiki.ros.org/$ROS_DISTRO/Installation/Source for more details

Expand Down
46 changes: 29 additions & 17 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ copy_eus_tex:
cp ../eus/doc/jlatex/*.tex ${TMPDIR}
cp ../eus/doc/jlatex/*.sty ${TMPDIR}
cp -r ../eus/doc/jlatex/fig/* ./fig/* ${TMPDIR}/fig/
cp ../eus/doc/latex/*.tex ${TMPDIR}
cp ../eus/doc/latex/*.sty ${TMPDIR}
cp -r ../eus/doc/latex/fig/* ./fig/* ${TMPDIR}/fig/
(cd ${TMPDIR};for x in fig/*.ps; do ps2ps $$x $$x.new; mv $$x.new $$x; done) ### ???? we need to run ps2ps to pass gs??
(cd ${TMPDIR};for x in fig/*.jpg; do extractbb $$x; done) # workaround for https://github.com/backtracking/bibtex2html/issues/9
cp *.tex ${TMPDIR}
cp ./*latex/*.tex ${TMPDIR}
platex --version | grep utf8 || nkf --in-place -e ${TMPDIR}/*.tex
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\
irteusgl ../eus/lib/llib/documentation.l "(make-document \"../irteus/$$x.l\" \"${TMPDIR}/$$x-func.tex\")" "(exit)"; \
Expand All @@ -34,27 +37,35 @@ current.tex:

toc: copy_eus_tex current.tex
(cd ${TMPDIR}; makeindex jmanual.tex)
(cd ${TMPDIR}; makeindex manual.tex)


dvi: toc
(cd ${TMPDIR}; platex jmanual.tex)
(cd ${TMPDIR}; platex jmanual.tex)
cp ${TMPDIR}/*.dvi .
(cd ${TMPDIR}; platex manual.tex)
cp ${TMPDIR}/j*.dvi ./jlatex
cp ${TMPDIR}/[!j]*.dvi ./latex

pdf: dvi
(cd ${TMPDIR}; dvipdfmx jmanual.dvi)
(cd ${TMPDIR}; dvipdfmx manual.dvi)
cp ${TMPDIR}/j*.pdf ./jlatex
cp ${TMPDIR}/[!j]*.pdf ./latex
cp ${TMPDIR}/*.pdf .


clean:
rm -f *~ *.aux *.idx *.log *.toc *.out *.ind *.ilg

distclean: clean
rm -f *.dvi *.pdf
rm -fr *.dvi *.pdf

html: dvi
mkdir -p ${TMPDIR}/html
(cd ${TMPDIR}; TRANSPARENT_COLOR="#ffffff" charset="UTF-8" latex2html -dir ${TMPDIR}/html -local_icons -split +3 -auto_prefix -init_file ${PWD}/../eus/doc/latex/.latex2html-init -iso_language JP -address "This document was generated using the LaTeX2HTML translator on `date` from <a href=\"http://github.com/euslisp/jskeus.git\">jskeus</a> version <a href=\"http://github.com/euslisp/jskeus/commit/`git -C ${PWD} rev-parse --verify HEAD`\">`git log -1 --oneline`</a>" -html_version="4.0,unicode" jmanual)
(cd ${TMPDIR}/html; for imgfile in jmanual-img*.png; do pngtopnm $$imgfile > /tmp/$$imgfile.pnm; pnmtopng -transparent white /tmp/$$imgfile.pnm > $$imgfile || echo "Failed to convert $$imgfile"; done)
(cd ${TMPDIR}; TRANSPARENT_COLOR="#ffffff" charset="UTF-8" latex2html -dir ${TMPDIR}/html -local_icons -split +3 -auto_prefix -init_file ${PWD}/../eus/doc/latex/.latex2html-init -iso_language JP -address "This document was generated using the LaTeX2HTML translator on `date` from <a href=\"http://github.com/euslisp/jskeus.git\">jskeus</a> version <a href=\"http://github.com/euslisp/jskeus/commit/`git -C ${PWD} rev-parse --verify HEAD`\">`git log -1 --oneline`</a>" -html_version="4.0,unicode" manual)
(cd ${TMPDIR}/html; for imgfile in jmanual-img*.png; do pngtopnm $$imgfile > ${TMPDIR}/$$imgfile.pnm; pnmtopng -transparent white ${TMPDIR}/$$imgfile.pnm > $$imgfile || echo "Failed to convert $$imgfile"; done)
(cd ${TMPDIR}/html; for imgfile in manual-img*.png; do pngtopnm $$imgfile > ${TMPDIR}/$$imgfile.pnm; pnmtopng -transparent white ${TMPDIR}/$$imgfile.pnm > $$imgfile || echo "Failed to convert $$imgfile"; done)
(cd ${TMPDIR}/html; sed -i 's@</TITLE>@</TITLE>\n<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">@' j*.html index.html)
cp -r ${TMPDIR}/html ./

Expand All @@ -65,32 +76,33 @@ rst: current.tex copy_eus_tex latex.py
cp latex.py ../eus/doc/latex/preamble.tex ${TMPDIR}
for file in ${TMPDIR}/*.tex; do \
name=`basename $$file .tex`; \
if [ \"$$name\" = \"test\" -o \"$$name\" = \"jmanual\" ]; then continue; fi; \
if [ \"$$name\" == \"test\" -o \"$$name\" == \"jmanual\" ]; then continue; fi; \
echo \"Converting $$name.tex to $$name.rst\"; \
(cd ${TMPDIR}; python3 latex.py -2 -L preamble.tex $$name.tex > /tmp/tmp_$$name.tex); \
pandoc /tmp/tmp_$$name.tex -o $$name.rst -V documentclass=ltjarticle --latex-engine=lualatex; \
(cd ${TMPDIR}; python3 latex.py -2 -L preamble.tex $$name.tex > ${TMPDIR}/tmp_$$name.tex); \
pandoc ${TMPDIR}/tmp_$$name.tex -o $$name.rst -V documentclass=ltjarticle --pdf-engine=lualatex; \
sed -i 's@.. figure:: \(.*\).ps@.. figure:: \1.png@g' $$name.rst; # use png for figures \
done
for file in ../eus/doc/jlatex/fig/*.ps; do \
name=`basename $$file .ps`; \
echo \"Converting $$name.ps to $$name.png\"; ### ???? we need to run ps2ps to pass gs?? does not happy with pstopnm \
pstopnm -stdout ../eus/doc/jlatex/fig/$$name.ps | pnmflip -rotate270 | pnmtopng - > fig/$$name.png; \
done
cp jmanual.tex /tmp/jmanual.tex
sed -i 's@\\input{\(.*\)}@..include:: \1\n@g' /tmp/jmanual.tex ### convert \input in tex to bypass pandoc EXCEPT current
sed -i '/..include:: current/r ${TMPDIR}/current.tex' /tmp/jmanual.tex ### convert \input in tex to bypass pandoc EXCEPT current
sed -i 's@\\part{\(.*\)}@.. toctree:: \1@' /tmp/jmanual.tex # convert \part in tex to bypass pandoc
sed -i ':a;/^[^%].*\\\\$$/{N;s/\\\\\n//;ba}' /tmp/jmanual.tex # concatinate title/author multi lines
sed -i '/^\\vspace{10mm}$$/d' /tmp/jmanual.tex # remove vspace{10mm} within title to pass pandoc
pandoc --no-wrap -s /tmp/jmanual.tex -o jmanual.rst -V documentclass=ltjarticle --latex-engine=lualatex

cp ./jlatex/jmanual.tex ${TMPDIR}/jmanual.tex
sed -i 's@\\input{\(.*\)}@..include:: \1\n@g' ${TMPDIR}/jmanual.tex ### convert \input in tex to bypass pandoc EXCEPT current
sed -i '/..include:: current/r ${TMPDIR}/current.tex' ${TMPDIR}/jmanual.tex ### convert \input in tex to bypass pandoc EXCEPT current
sed -i 's@\\part{\(.*\)}@.. toctree:: \1@' ${TMPDIR}/jmanual.tex # convert \part in tex to bypass pandoc
sed -i ':a;/^[^%].*\\\\$$/{N;s/\\\\\n//;ba}' ${TMPDIR}/jmanual.tex # concatinate title/author multi lines
sed -i '/^\\vspace{10mm}$$/d' ${TMPDIR}/jmanual.tex # remove vspace{10mm} within title to pass pandoc
pandoc --wrap=none -s ${TMPDIR}/jmanual.tex -o jmanual.rst -V documentclass=ltjarticle --pdf-engine=lualatex
pandoc --wrap=none -s ${TMPDIR}/manual.tex -o manual.rst -V documentclass=ltjarticle --pdf-engine=lualatex
sed -i '[email protected]:: \(.*\)@ \1@' jmanual.rst # restore ..include for rst
sed -i 's@.. toctree:: \(.*\)@.. toctree::\n :maxdepth: 2\n :caption: \1@' jmanual.rst # restore ..toctree for rst
sed -i 's@\*\* \*\*@\*\*\n\*\*@g' jmanual.rst # add newline after ** ** in title
sed -i 's@** -\(.*\)$$@**\n\n-\1\n@' jmanual.rst # add newline before -ロボットモデリングの拡張 in title
sed -i -ne '3!{p;d;};h;n;p;g;p' jmanual.rst ## swap 2nd and 3rd line
sed -i -ne '4!{p;d;};h;n;:1;7!{N;b1};G;h;n;p;g;p' jmanual.rst ## swap lines https://www.unix.com/shell-programming-and-scripting/85230-swapping-switching-2-lines-using-sed.html
sed -i -ne '2h;2!H;$${g;s/\n/ /;p}' jmanual.rst ## concatenate EusLisp and Reference Manual (https://unix.stackexchange.com/questions/188264/want-to-substitute-only-first-occurence-with-sed)
sed -i 's/^:Author:/:Authors: -/' jmanual.rst # use :authors: insteqad of :author:
sed -i 's/^:Author:/:Authors: -/' jmanual.rst # use :authors: instead of :author:
sed -ie '/^:Authors:/ {p;s/.*//;N; s/\n/\ \ \ \ \ \ \ \ \ \ -\ /;}' jmanual.rst # add authors after :authors:
head -n 20 jmanual.rst

1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def sh(command):
sh("mkdir -p _build/html")
sh("cd _build/html; ln -sf jmanual.html index.html; ls -al")
sh("find _build/html -type f -a -name 'j*.html' -a ! -name 'jmanual.html' -a -exec sed -i '[email protected]/euslisp/jskeus/blob/\(.*\)/doc/@github.com/euslisp/EusLisp/blob/\1/doc/jlatex/@' {} \;")
sh("find _build/html -type f -a -name 'j*.html' -a ! -name 'manual.html' -a -exec sed -i '[email protected]/euslisp/jskeus/blob/\(.*\)/doc/@github.com/euslisp/EusLisp/blob/\1/doc/latex/@' {} \;")
# sh("sed -i '[email protected]/euslisp/jskeus/blob/\(.*\)/doc/@github.com/euslisp/EusLisp/blob/\1/doc/jlatex/@' _build/html/j!(manual).html || echo OK")


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file renamed doc/jmanual.dvi → doc/jlatex/jmanual.dvi
Binary file not shown.
Binary file added doc/jlatex/jmanual.pdf
Binary file not shown.
File renamed without changes.
Binary file modified doc/jmanual.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions doc/latex/irtbvh_en.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\section{BVH Data}
\input{irtbvh-func}
2 changes: 2 additions & 0 deletions doc/latex/irtcollada_en.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\section{Collada Data}
\input{irtcollada-func}
Loading