2018-05-01から1ヶ月間の記事一覧

ミニマルなROSのテスト

talker.py #!/usr/bin/env python import rospy from std_msgs.msg import String def talker(): rospy.init_node('talker') pub = rospy.Publisher('chatter',String) rate = rospy.Rate(5) while not rospy.is_shutdown(): msg = "hello" rospy.loginfo(ms…

PynquinoでJupyterからZsprinterにG-codeを送信する

import time BUFSIZE = 6 FAST_DELAY_TIME = 0.01 with open('data/octo.gcode') as file: lines = file.readlines() line_number = 0 buflen_accum_last = 0 buflen_accum = 0 bufdiff = 0 buflen_accum_finished = 0 buflen_accum_finished_last = 0 bufle…

Jupyter notebookでMatplotlibを使ってグラフのリアルタイム描画

https://stackoverflow.com/questions/21360361/how-to-dynamically-update-a-plot-in-a-loop-in-ipython-notebook-within-one-cell %matplotlib inline import time import pylab as pl from IPython import display for i in range(10): pl.plot(pl.randn(…

RPi3の無線設定

sudo vi /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # So…

blocklyのビルド

1. Closure-libraryのインストール(※Clojureではない) https://developers.google.com/blockly/guides/modify/web/closure 以下のフォルダ構成になるようにclosure-libraryを配置する 2. build.pyの修正 https://github.com/google/blockly/issues/1399#issu…