セル生産方式におけるロボットの活用には様々な問題があるが,その一つとして 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上でリアルタイムで動作します。
21. 21
FizzBuzz04 ~ map と高階関数~
object FizzBuzz04 {
def main(args: Array[String]) {
def fizzbuzz(i: Int): String =
if (i % 3 == 0 && i % 5 == 0)
"FizzBuzz"
else if (i % 3 == 0)
"Fizz"
else if (i % 5 == 0)
"Buzz"
else
i.toString()
1 to 20 map { fizzbuzz } foreach println
}
}
引数がInt型1つで、String型を返す
fizzbuzz という名前の関数を定義し、
map を使って処理を書いてみましょう。
22. 22
FizzBuzz04 ~ map と高階関数~
object FizzBuzz04 {
def main(args: Array[String]) {
def fizzbuzz(i: Int): String =
if (i % 3 == 0 && i % 5 == 0)
"FizzBuzz"
else if (i % 3 == 0)
"Fizz"
else if (i % 5 == 0)
"Buzz"
else
i.toString()
1 to 20 map { fizzbuzz } foreach println
}
}
23. 23
FizzBuzz04 ~ map と高階関数~ の後説
// foreach println も同じ形でした
(1 to 5) foreach { x => println(x) }
(1 to 5) foreach { println(_) }
(1 to 5) foreach println
24. 24
FizzBuzz05 ~ map と無名関数~ の前説
(1 to 5) map { (x: Int) => x * 2 } foreach println
// 省略形
(1 to 5) map { x => x * 2 } foreach println
(1 to 5) map { _ * 2 } foreach println
// 実行結果
2
4
6
8
10
25. 25
FizzBuzz05 ~ map と無名関数~
object FizzBuzz05 {
def main(args: Array[String]) {
(1 to 20) map { x =>
if (x % 3 == 0 && x % 5 == 0)
"FizzBuzz"
else if (x % 3 == 0)
"Fizz"
else if (x % 5 == 0)
"Buzz"
else
x.toString
} foreach println
}
}
map と無名関数を使って
処理を書いてみましょう。
26. 26
FizzBuzz05 ~ map と無名関数~
object FizzBuzz05 {
def main(args: Array[String]) {
(1 to 20) map { x =>
if (x % 3 == 0 && x % 5 == 0)
"FizzBuzz"
else if (x % 3 == 0)
"Fizz"
else if (x % 5 == 0)
"Buzz"
else
x.toString
} foreach println
}
}
27. 27
FizzBuzz06 ~ match-case ~ の前説 1/2
// 例1
val num = 1
val daiji = num match {
case 1 => "壱"
case 2 => "弐"
case _ => "参以上"
}
println(daiji)
// 実行結果
壱
28. 28
FizzBuzz06 ~ match-case ~ の前説 2/2
// 例2
val date = new Date
val msg = date.getDate match {
case d if (d % 2 == 0) => "今日は偶数日です。"
case _ => "今日は奇数日です。"
}
println(msg)
// 実行結果(27日の場合)
今日は奇数日です。
29. 29
FizzBuzz06 ~ match-case ~
object FizzBuzz06 {
def main(args: Array[String]) {
(1 to 20) map { num =>
num match {
case x if (x % 3 == 0 && x % 5 == 0) => "FizzBuzz"
case x if (x % 3 == 0) => "Fizz"
case x if (x % 5 == 0) => "Buzz"
case x => x.toString()
}
} foreach println
}
}
match-case を使って
処理を書いてみましょう。
30. 30
FizzBuzz06 ~ match-case ~
object FizzBuzz06 {
def main(args: Array[String]) {
(1 to 20) map { num =>
num match {
case x if (x % 3 == 0 && x % 5 == 0) => "FizzBuzz"
case x if (x % 3 == 0) => "Fizz"
case x if (x % 5 == 0) => "Buzz"
case x => x.toString()
}
} foreach println
}
}
31. 31
FizzBuzz07 ~ map と match の省略 ~ の前説
val daijis = (1 to 5) map { num =>
num match {
case 1 => "壱"
case 2 => "弐"
case _ => "参以上"
}
}
// 省略形
val daijis2 = (1 to 5) map {
case 1 => "壱"
case 2 => "弐"
case _ => "参以上"
}
32. 32
FizzBuzz07 ~ map と match の省略 ~
object FizzBuzz07 {
def main(args: Array[String]) {
1 to 20 map {
case x if (x % 3 == 0 && x % 5 == 0) => "FizzBuzz"
case x if (x % 3 == 0) => "Fizz"
case x if (x % 5 == 0) => "Buzz"
case x => x.toString()
} foreach println
}
}
match を省略した
処理を書いてみましょう。
33. 33
FizzBuzz07 ~ map と match の省略 ~
object FizzBuzz07 {
def main(args: Array[String]) {
1 to 20 map {
case x if (x % 3 == 0 && x % 5 == 0) => "FizzBuzz"
case x if (x % 3 == 0) => "Fizz"
case x if (x % 5 == 0) => "Buzz"
case x => x.toString()
} foreach println
}
}
34. 34
FizzBuzz08 ~ 再帰、クロージャ、コンス(分ける) ~
import scala.collection.mutable.ListBuffer
object FizzBuzz08 {
def main(args: Array[String]) {
val lines = new ListBuffer[String]
def fizzbuzzRec(numbers: List[Int]) {
numbers match {
case Nil =>
case number :: tail => {
lines.append(number match {
case x if (x % 3 == 0 && x % 5 == 0) => "FizzBuzz"
case x if (x % 3 == 0) => "Fizz"
case x if (x % 5 == 0) => "Buzz"
case x => x.toString
})
fizzbuzzRec(tail)
}
}
}
fizzbuzzRec(1 to 20 toList)
lines foreach println
}
}
35. 35
FizzBuzz09 ~ 末尾再帰、コンス(連結) ~
import scala.collection.mutable.ListBuffer
import scala.annotation.tailrec
object FizzBuzz09 {
def main(args: Array[String]) {
def fizzbuzzRec(numbers: List[Int]): List[String] = {
@tailrec
def fizzbuzzRecLocal(accumulator: List[String],
numbers: List[Int]): List[String] = {
numbers match {
case Nil => accumulator
case number :: tail => fizzbuzzRecLocal(
accumulator ::: List(
number match {
case x if (x % 3 == 0 && x % 5 == 0) => "FizzBuzz"
case x if (x % 3 == 0) => "Fizz"
case x if (x % 5 == 0) => "Buzz"
case x => x.toString
}
), tail
)
}
}
fizzbuzzRecLocal(Nil, numbers)
}
fizzbuzzRec(1 to 20 toList) foreach println
}
}
class Person { def getMessage(): String = { return "Hello world!" } def printMessage(): Unit = { println("wakuwaku Scala!") } } object Main { def main(args: Array[String]): Unit = { val person1 = new Person() println(person1.getMessage()) var person2 = new Person() person2.printMessage() person2 = new Person() person2.printMessage() } } class Person2 { def getMessage = "Hello world!" def printMessage { println("wakuwaku Scala!") } } object Main2 { def main(args: Array[String]) { val person1 = new Person println(person1.getMessage) var person2 = new Person person2.printMessage person2 = new Person person2.printMessage } }