2022-10-10

やること

  • Makefile の解析
  • shell script の解析

wakeonlan で 開発マシンを起こすの便利。

$ cat .local/bin/boot-endeavor.sh
#!/bin/bash

wakeonlan "xx:xx:xx:xx:xx:xx" # mac address

ROS2

ROS のメッセージ型の生成元をたどった。以下の例は std_msgs/msg/string.h の場合

※ メッセージの定義仕様は Message description specification に記載されている。

$ head -n 2 /opt/ros/foxy/include/std_msgs/msg/string.h
// generated from rosidl_generator_c/resource/idl.h.em
// with input from std_msgs:msg/String.idl
$ head -n 2 /opt/ros/foxy/share/std_msgs/msg/String.idl
// generated from rosidl_adapter/resource/msg.idl.em
// with input from std_msgs/msg/String.msg

以下が大元の String.msg 、

$ cat /opt/ros/foxy/share/std_msgs/msg/String.msg
# This was originally provided as an example message.
# It is deprecated as of Foxy
# It is recommended to create your own semantically meaningful message.
# However if you would like to continue using this please use the equivalent in example_msgs.

string data

以下は Vector3.msg 、

$ cat /opt/ros/foxy/share/geometry_msgs/msg/Vector3.msg
# This represents a vector in free space.

# This is semantically different than a point.
# A vector is always anchored at the origin.
# When a transform is applied to a vector, only the rotational component is applied.

float64 x
float64 y
float64 z

以下は Twist.msg 、

$ cat /opt/ros/foxy/share/geometry_msgs/msg/Twist.msg
# This expresses velocity in free space broken into its linear and angular parts.

Vector3  linear
Vector3  angular

以下は Quaternion.msg 、

$cat /opt/ros/foxy/share/geometry_msgs/msg/Quaternion.msg
# This represents an orientation in free space in quaternion form.

float64 x 0
float64 y 0
float64 z 0
float64 w 1

Elixir

テンプレートファイル、 テンプレート文字列に対し、変数埋め込みをする Embedded Elixir (EEx) がある。

参考

Makefile

Makefile 内で使える関数はいろいろあるみたい。