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

20151118 homework #353

Open
wants to merge 2 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
24 changes: 24 additions & 0 deletions 20151021/src/euslisp/kadai1.l
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
(if (not (boundp '*irtviewer*)) (make-irtviewer))

(setq sun (make-sphere 100))
(send sun :set-color :red)

(setq earth (make-sphere 10))
(send earth :set-color :blue)

(setq moon (make-sphere 2))
(send moon :set-color :yellow)

(send earth :locate #f(200 0 0))

(send sun :assoc earth)
(send earth :assoc moon)
(send moon :locate #f(250 0 0))

(objects (list sun earth moon))

(do-until-key
(send sun :rotate (deg2rad 5) :z)
(send earth :rotate (deg2rad 10) :z)
(send *irtviewer* :draw-objects)
)
37 changes: 37 additions & 0 deletions 20151021/src/euslisp/kadai2.l
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
;;(if (not (boundp '*irtviewer*)) (make-irtviewer))

(defun make-piston-cylinder nil
(let (b1 b2)
(setq b1 (make-cylinder 10 50))
(send b1 :locate #f(0 0 0))
(setq b2 (make-cylinder 6 50))
(send b2 :locate #f(0 0 0))
(setq b1 (body- b1 b2))
(send b1 :set-color :red)
b1))

(defun make-piston nil
(let (b1 b2 b3 b4 b5)
(setq b1 (make-cylinder 7.9 15 ))
(setq b2 (make-cylinder 2 10))
(send b2 :locate #f(0 0 15))
(setq b3 (make-cube 6 10 2))
(send b3 :locate #f(0 0 25))
(setq b4 (body+ b1 b2))
(send b3 :set-color :gray80)
(send b4 :set-color :white)
(setq b5 (body+ b3 b4))
b5))


(setq c1 (instance bodyset-link :init (make-cascoords) :bodies (list (make-piston-cylinder))))
(setq p1 (instance bodyset-link :init (make-cascoords) :bodies (list (make-piston))))
(setq a1 (instance rotational-joint :init :parent-link c1 :child-link p1 :axis :z))

(setq r (instance cascaded-link :init))
(send r :assoc c1)
(send c1 :assoc p1)
(setq (r . links) (list c1 p1))
(setq (r . joint-list) (list a1))
(send r :init-ending)

1 change: 1 addition & 0 deletions 20151118/src/enshu_20151118/EchoServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public void setORB(ORB orb_val){
}
// implement echoString() method
public void echoString(String input){
System.err.println(">>"+input);
}
// implement shutdown() method
public void shutdown(){
Expand Down
4 changes: 4 additions & 0 deletions 20151118/src/enshu_20151118/kadai3.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<launch>
<node pkg="enshu_20151118" name="talker" type="talker.l" />
<node pkg="enshu_20151118" name="listener" type="listener.l" />
</launch>
2 changes: 1 addition & 1 deletion 20151118/src/enshu_20151118/sample.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

import xmlrpclib
server =xmlrpclib.Server('http://xmlrpc-c.sourceforge.net/api/sample.ph')
server =xmlrpclib.Server('http://xmlrpc-c.sourceforge.net/api/sample.php')
result = server.sample.add(1,2)
print result