Spring Fest 2018 Spring Bootで作るRESTful Web ServiceWataruOhno
Spring Fest 2018の資料です。
本セッションでは、Spring BootでRESTful Web Serviceを作成する方法についてお話しします。 環境構築から実装方法、またMockMVCを使ったテストまでを簡単なサンプルを使って解説していきます。 初心者向けのセッションですので、興味のある方はお気軽にお越しください。
Spring Fest 2018 Spring Bootで作るRESTful Web ServiceWataruOhno
Spring Fest 2018の資料です。
本セッションでは、Spring BootでRESTful Web Serviceを作成する方法についてお話しします。 環境構築から実装方法、またMockMVCを使ったテストまでを簡単なサンプルを使って解説していきます。 初心者向けのセッションですので、興味のある方はお気軽にお越しください。
Grails 3.0先取り!? Spring Boot入門ハンズオン #jggug_bootToshiaki Maki
Spring Bootのハンズオン資料です。
----
Grailsの次期バージョン3.0でベースになることが予定されている、Spring界隈の新しいトレンド"Spring Boot"のハンズオンを通じて、Spring Bootのイメージを掴んでもらいたいと思います。内容は以下の通りです。
Spring Boot概要説明
Spring Bootを用いて簡単なアプリケーションを実際に作ってみる
(合計で約二時間弱)
セル生産方式におけるロボットの活用には様々な問題があるが,その一つとして 3 体以上の物体の組み立てが挙げられる.一般に,複数物体を同時に組み立てる際は,対象の部品をそれぞれロボットアームまたは治具でそれぞれ独立に保持することで組み立てを遂行すると考えられる.ただし,この方法ではロボットアームや治具を部品数と同じ数だけ必要とし,部品数が多いほどコスト面や設置スペースの関係で無駄が多くなる.この課題に対して音𣷓らは組み立て対象物に働く接触力等の解析により,治具等で固定されていない対象物が組み立て作業中に運動しにくい状態となる条件を求めた.すなわち,環境中の非把持対象物のロバスト性を考慮して,組み立て作業条件を検討している.本研究ではこの方策に基づいて,複数物体の組み立て作業を単腕マニピュレータで実行することを目的とする.このとき,対象物のロバスト性を考慮することで,仮組状態の複数物体を同時に扱う手法を提案する.作業対象としてパイプジョイントの組み立てを挙げ,簡易な道具を用いることで単腕マニピュレータで複数物体を同時に把持できることを示す.さらに,作業成功率の向上のために RGB-D カメラを用いた物体の位置検出に基づくロボット制御及び動作計画を実装する.
This paper discusses assembly operations using a single manipulator and a parallel gripper to simultaneously
grasp multiple objects and hold the group of temporarily assembled objects. Multiple robots and jigs generally operate
assembly tasks by constraining the target objects mechanically or geometrically to prevent them from moving. It is
necessary to analyze the physical interaction between the objects for such constraints to achieve the tasks with a single
gripper. In this paper, we focus on assembling pipe joints as an example and discuss constraining the motion of the
objects. Our demonstration shows that a simple tool can facilitate holding multiple objects with a single gripper.
【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matchingharmonylab
公開URL:https://arxiv.org/pdf/2404.19174
出典:Guilherme Potje, Felipe Cadar, Andre Araujo, Renato Martins, Erickson R. ascimento: XFeat: Accelerated Features for Lightweight Image Matching, Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2023)
概要:リソース効率に優れた特徴点マッチングのための軽量なアーキテクチャ「XFeat(Accelerated Features)」を提案します。手法は、局所的な特徴点の検出、抽出、マッチングのための畳み込みニューラルネットワークの基本的な設計を再検討します。特に、リソースが限られたデバイス向けに迅速かつ堅牢なアルゴリズムが必要とされるため、解像度を可能な限り高く保ちながら、ネットワークのチャネル数を制限します。さらに、スパース下でのマッチングを選択できる設計となっており、ナビゲーションやARなどのアプリケーションに適しています。XFeatは、高速かつ同等以上の精度を実現し、一般的なラップトップのCPU上でリアルタイムで動作します。
5. Springの年譜
• 2002年11月 書籍:Expert One-on-One J2EE
• 2004年3月 Spring 1.0
• 2004年9月 Spring 1.1
• 2005年5月 Spring 1.2
• 2006年10月 Spring 2.0
• 2007年11月 Spring2.5
• 2009年12月 Spring3.0
• 2011年12月 Spring3.1
‒ Java7, Spring Cache...
• 201x年 Spring3.2
‒ Hibernate4 FullSupport...
5
6. Springの主なプロジェクト
• Spring AMQP • Spring Mobile
• Spring Android • Spring .NET
• Spring Batch • Spring Roo
• Spring BlazeDS • Spring Security
• Spring Data • Spring Security
• Spring Framework OAuth
• Spring Gemfire • Spring Social
• Spring Integration • Spring Web Flow
• Spring Web
Services
6
27. インタフェース導入の難しさ
• インタフェースの実装を、インタフェースを利用するク
ラスが生成(インスタンス化)してはいけない
public class R { ②利用
・・・ QImpl
Q q = new QImpl(); // ダメ R (Qの実装)
q.methodA(); Q
String m
= q.methodB();
・・・ ①生成
27
28. インタフェース導入とFactory
• インタフェースの実装を生成(インスタンス化)する
Factory(FactoryMethod)を用意(自作)すること
で解決する
public class R {
③利用
・・・
QImpl
Q q =
R (Qの実装)
(Q)Factory.create(KEY);
Q
①生成の
q.methodA();
要求
String m
②生成
Factory
= q.methodB();
・・・
KEY=QImpl
28
37. アノテーションを利用したDI
• インジェクションの設定(自動検出)
‒ @Autowired
• Beanの設定
‒ @Component
Injection
class Service { @Component
@Autowired class DaoImpl
private Dao dao; implements Dao {
... ...
} Dao }
37
44. 問題 2つあったら?
• Autowireでインタフェースを実装するク
ラスが2つあったらどうなる?
class Service { @Component
@Autowired class ADaoImpl
private Dao dao; implements Dao {
... ...
} Dao }
@Component
class BDaoImpl
implements Dao {
...
}
45. 問題 じゃあ、Unitテストどうする?
class Service { @Component
@Autowired class DaoImpl
private Dao dao; implements Dao {
... ...
} Dao }
@Component
class TestDaoImpl
implements Dao {
...
}
55. Bean定義ファイル
<?xml version="1.0" encoding="UTF-8"?> contextがないことに注意
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id = "service"
class = "sample.di.service. ServiceImpl">
<property name = "dao" ref = "dao"/>
</bean>
<bean id = "dao"
class = "sample.di.dataaccess.DaoImpl" />
</beans>
55
56. 主要タグの主な属性
<bean>
属性
意味
id システム内で一意とするオブジェクト名。
name Bean定義ファイル内で、id以外に名前を設定したい場合に設
定する別名。
空白、「,」、「;」で区切ることにより、複数の値を設定できる。
class idの実態。パッケージ名+クラス名。
<property>
属性
意味
name ref属性で指定したオブジェクトをインジェクションする属性の名
前。「set + “name属性で指定した属性名”」のメソッドを利用
する(属性名は使われないことに注意)。
ref インジェクションしたいbeanのid(beanタグのid属性で指定され
た名前)。
56
57. セッタインジェクション
ServiceImpl DaoImpl
Dao
setDao
Spring
public class ServiceImpl implements Service {
private Dao dao;
public void setDao(Dao dao) {
this. dao = dao;
}
…
57
58. 定義ファイル
ServiceImpl DaoImpl
Dao
setDao
Spring
・・・
<bean id = service"
class = com.starlight.business.ServiceImpl">
<property name = dao ref = dao"/>
</property>
</bean>
<bean id = dao"
class = com.starlight.dataaccess.DaoImpl" />
・・・
58
59. 定義ファイル
ServiceImpl DaoImpl
Dao
setDao
Spring
・・・
<bean id = service"
class = com.starlight.business.ServiceImpl" autowire="byType" />
<bean id = dao"
class = com.starlight.dataaccess.DaoImpl" />
・・・
59
60. 問題 じゃあ、これはどうなる?
• クラス図を書いてみてください
・・・
<bean id="hogeService"
class="sample.HogeServiceImpl">
<property name = "hogeDao" ref = "hogeDao"/>
<property name = "hogehogeDao" ref = "hogehogeDao"/>
</bean>
<bean id = "hogeDao" class = "sample.HogeDaoImpl" />
<bean id = "hogehogeDao" class = "sample.HogehogeDaoImpl" />
・・・
61. 問題 エラー?どうして?
• 前の問題の続きです。エラーの原因はなんでしょう
public class HogeServiceImpl {
private HogeDaoImpl hd;
private HogehogeDaoImpl hhd;
...
public void setHd (HogeDaoImpl hd) {
this.hd = hd;
}
public void setHhd(HogehogeDaoImpl hhd) {
this.hhd = hhd;
}
}