More than 5 years have passed since last update.
よく使っていたワンライナーのメモ
## /scanはsensor_msgs/LaserScan型のトピック
# 輝度の最大値を表示
rostopic echo /scan | grep inten | ruby -ne "i=gets.split(',').map(&:to_i).max();puts i"
# 輝度が1500を超えている点の個数を取得
rostopic echo /scan | grep inten | ruby -ne "i=gets.split(' ').map(&:to_i).select{|elem| elem>1500}.length;puts i"
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
