profile
viewpoint
Andrew Blakey ablakey @locusrobotics Kitchener, Ontario Roboticist / Geographer

ablakey/periodic 31

The Periodic Table of Github

ablakey/Leaflet.SimpleGraticule 29

A graticule for Leaflet maps in the L.CRS.Simple coordinate system

ablakey/chip8 5

A Chip8 Emulator in Rust

ablakey/awesome-robotic-tooling 0

Just a bunch of powerful robotic resources and tools for professional robotic development with ROS in C++ and Python.

ablakey/catkin_virtualenv 0

Bundle python requirements in a catkin package via virtualenv

ablakey/django-uwsgi-nginx 0

Dockerfile and configuration files to build a working Django container with uwsgi and nginx

Pull request review commentlocusrobotics/wireless

RST-3447 Fix crashing when wifi loses AP association

 def main():                 previous_error = False                 rospy.loginfo("Retrieved status of interface %s. Now updating at %f Hz." % (dev, hz)) -        except subprocess.CalledProcessError:+        except:

Cool. In Python tradition there's like 5 linters and countless settings for them. Mine complains but I imagine the one we run in CI doesn't.

No big deal either way, I'm not saying you must change this. Just wanted to share the segment of knowledge.

ayrton04

comment created time in a day

Pull request review commentlocusrobotics/wireless

RST-3447 Fix crashing when wifi loses AP association

 def main():                 previous_error = False                 rospy.loginfo("Retrieved status of interface %s. Now updating at %f Hz." % (dev, hz)) -        except subprocess.CalledProcessError:+        except:

Apparently I'm subscribed to this and so I got emails about this PR even though I'm not on it. Got curious and took a look and want to share some unrequested feedback.

Typically naked except: is not what you want, to the extent that it's usually a linting error. If you do want to capture everything, use except Exception:. It's actually different because Exception doesn't include some exceptions like KeyboardInterrupt and SystemExit. You can see a really nice hierarchy here: https://docs.python.org/3/library/exceptions.html#exception-hierarchy

And if the answer is. "Yuuup I knew that and want to capture those exceptions too" well then homer_receeding _into_the_bushes.gif

ayrton04

comment created time in a day

startedbrandonros/tricore-emulator-rust

started time in 3 days

pull request commentvadimcn/vscode-lldb

Update value.py for python3 support

Given it's an unbounded collection that could be very large (if someone's trying to expand a massive array of elements in their debugger), this is one of those times where the lazy generator behaviour of xrange might actually matter. But I definitely defer to your judgment on the matter.

ablakey

comment created time in 7 days

issue commentjmrivas86/django-json-widget

ReferenceError: Can't find variable: JSONEditor

All I had to do was a collectstatic given I'm using storages to put static assets in AWS. <-- Just a breadcrumb in case someone else comes looking for insight.

thestick613

comment created time in 7 days

PR opened vadimcn/vscode-lldb

Update value.py for python3 support

When using vscode-lldb for debugging rust, I attempted to access a slice of a vector:

buffer[0:100]

It returned name xrange is not deifned

Looking in value.py I found that there's a reference to xrange, which isn't valid in python3. This similar fix exists (but other way around) here: https://github.com/vadimcn/vscode-lldb/blob/35151d7d2de84376987e2bbc747192034e307584/formatters/rust.py#L10

I'm all ears on how you'd like me to enhance this PR to make it acceptable.

+3 -0

0 comment

1 changed file

pr created time in 8 days

push eventablakey/vscode-lldb

Andrew Blakey

commit sha 7861998f1634ff7b9ca43fe95a5f833f2f96e012

Update value.py for python3 support

view details

push time in 8 days

push eventablakey/chip8

Andrew Blakey

commit sha 51f49c9656ace2d1f053c75a862bf6466e7f1a40

minor cleanup, being more rust-idiomatic

view details

push time in 19 days

startedbvaughn/react-window

started time in 21 days

created taglocusrobotics/rosbridge_suite

tag0.11.1-1

Server Implementations of the rosbridge v2 Protocol

created time in a month

push eventlocusrobotics/rosbridge_suite

Andrew Blakey

commit sha 1050b9c4a044210537d35d030ca58696d66636e1

get rid of test code

view details

push time in a month

push eventlocusrobotics/rosbridge_suite

Andrew Blakey

commit sha 2feda49a0933977fb27a2defec6144f381332aa8

update

view details

push time in a month

create barnchlocusrobotics/rosbridge_suite

branch : RST-3396-rosbridge-failures

created branch time in a month

push eventablakey/chip8

Andrew Blakey

commit sha 9392da63c39fa5b494d5e64f8c303f8105e912d9

Update main.rs

view details

push time in a month

push eventablakey/chip8

Amjad Alsharafi

commit sha ad69bfbe54fb251950b6a53e86977f6059dcc5f8

BugFix: index out of bound when trying to draw on the edge of the screen - Wrapping implemented to fix it.

view details

Amjad Alsharafi

commit sha 32e7364bb7005358d9e310760582505718b4bd47

Edit: added help message if the user did not specify rom file

view details

Andrew Blakey

commit sha f50c399f754328c9e6c575be8132f6fa335c2af7

Merge pull request #1 from Amjad50/master Bugs and error fixes

view details

push time in a month

PR merged ablakey/chip8

Bugs and error fixes

These two errors were due to index out of bound.

  • in args
  • in graphics_buffer
+13 -1

3 comments

2 changed files

Amjad50

pr closed time in a month

Pull request review commentablakey/chip8

Bugs and error fixes

 impl Debugger {  fn main() {     let args: Vec<String> = env::args().collect();++    // mostly redundant+    assert_eq!(args.len() > 0, true);

That doesn't seem like a practical case to be concerned about, but I also didn't know that!

Amjad50

comment created time in a month

Pull request review commentablakey/chip8

Bugs and error fixes

 impl Debugger {  fn main() {     let args: Vec<String> = env::args().collect();++    // mostly redundant+    assert_eq!(args.len() > 0, true);

How could this ever happen? I thought the first argument is always the name of the program? So there shall always be one argument?

Amjad50

comment created time in a month

pull request commentablakey/chip8

Bugs and error fixes

Ah yes I can see that in Tetris too now. Thanks! Really happy to learn something and get a PR too.

Amjad50

comment created time in a month

pull request commentablakey/chip8

Bugs and error fixes

Hey thank you for this!

I understand the args overflow, but let me confirm my understanding of the graphics_buffer overflow bug.

My take is that you have a ROM that actually utilizes the chip8 spec "if pixels are drawn beyond the buffer they wrap back to the left side"? I imagine I never found this bug because I just didn't test with enough ROMs.

Amjad50

comment created time in a month

startedRobotWebTools/rosbridge_suite

started time in a month

push eventablakey/chip8

Andrew Blakey

commit sha c8a35ff40bdf8b32f7fa3b4a2bee430216a5504b

Update README.md

view details

push time in a month

push eventablakey/chip8

Andrew Blakey

commit sha e31674cea73d84090812f24e1f279120cb0043ef

cleanup

view details

push time in a month

push eventablakey/chip8

Andrew Blakey

commit sha ca632fb9367b4b73620bf142e3b94e3eff880786

cleanup

view details

push time in a month

push eventablakey/chip8

Andrew Blakey

commit sha 91baeb6f34d2556361567d3730dea17e61c02ba0

Cleanup. Sound working.

view details

push time in a month

push eventablakey/chip8

Andrew Blakey

commit sha 863c386af4620f92f1f258a10c73f22094ee08e2

it works!

view details

push time in a month

startedkylewlacy/lochnes

started time in a month

push eventablakey/chip8

Andrew Blakey

commit sha b11f8ef5d9282fb8ebf656aaf2a4266feca089f1

fixed tetris

view details

push time in a month

push eventablakey/chip8

Andrew Blakey

commit sha f615e991297456b253876cbe0d756699d63d1486

tetris is broken

view details

push time in a month

push eventablakey/chip8

Andrew Blakey

commit sha edb2d27d9346b0756e32122524f3f6dd0966aed3

Fixed a clearing issue in graphics. Implemented more opcodes.

view details

push time in a month

push eventablakey/chip8

Andrew Blakey

commit sha 59a319235f8a8dcad64d2c45f4689d27d838483e

progress, with bitfield

view details

push time in a month

create barnchablakey/chip8

branch : bitfield

created branch time in a month

push eventablakey/chip8

Andrew Blakey

commit sha ac4b3e37b15c66233597e132e3e2b54d768a9f89

progress

view details

Andrew Blakey

commit sha 96dc991d289c2e787a920bdb51d7996442504bd2

added simple debugger and some test roms

view details

Andrew Blakey

commit sha e0f39afd0002ed7c186f34d8d78848d08422e5d2

update debugger

view details

push time in a month

push eventablakey/chip8

Andrew Blakey

commit sha e0f39afd0002ed7c186f34d8d78848d08422e5d2

update debugger

view details

push time in a month

create barnchablakey/chip8

branch : tui-debugger

created branch time in a month

Pull request review commentlocusrobotics/catkin_virtualenv

RST-3172 Check that requirements file is locked

+#!/usr/bin/env python3+# Software License Agreement (GPL)+#+# \file      venv_install+# \authors   Paul Bovbel <pbovbel@locusrobotics.com>+# \copyright Copyright (c) (2017,), Locus Robotics, All rights reserved.+#+# This program is free software: you can redistribute it and/or+# modify it under the terms of the GNU General Public License as+# published by the Free Software Foundation, either version 2 of the+# License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful, but+# WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU+# General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program. If not, see <http://www.gnu.org/licenses/>.++import argparse+import inspect+import sys++import xml.etree.ElementTree as ET++from catkin_virtualenv import configure_logging+from catkin_virtualenv.venv import Virtualenv+++if __name__ == '__main__':+    logger = configure_logging()++    parser = argparse.ArgumentParser(description=Virtualenv.install.__doc__)+    parser.add_argument(+        'venv', help="Path of virtualenv to manage")+    parser.add_argument(+        '--requirements', required=True, help="Requirements to check.")+    parser.add_argument(+        '--extra-pip-args', default="\"\"", type=str, help="Extra pip args for install.")

This any different from '""' ?

paulbovbel

comment created time in a month

Pull request review commentlocusrobotics/catkin_virtualenv

RST-3172 Check that requirements file is locked

+#!/usr/bin/env python3+# Software License Agreement (GPL)+#+# \file      venv_install+# \authors   Paul Bovbel <pbovbel@locusrobotics.com>+# \copyright Copyright (c) (2017,), Locus Robotics, All rights reserved.+#+# This program is free software: you can redistribute it and/or+# modify it under the terms of the GNU General Public License as+# published by the Free Software Foundation, either version 2 of the+# License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful, but+# WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU+# General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program. If not, see <http://www.gnu.org/licenses/>.++import argparse+import inspect+import sys++import xml.etree.ElementTree as ET++from catkin_virtualenv import configure_logging+from catkin_virtualenv.venv import Virtualenv+++if __name__ == '__main__':+    logger = configure_logging()++    parser = argparse.ArgumentParser(description=Virtualenv.install.__doc__)+    parser.add_argument(+        'venv', help="Path of virtualenv to manage")
        'venv', help="Path of virtualenv to manage.")
paulbovbel

comment created time in a month

startedwebsockets-rs/rust-websocket

started time in a month

Pull request review commentlocusrobotics/catkin_virtualenv

Fix input requirements warning

 function(catkin_generate_virtualenv)         ${CMAKE_BINARY_DIR}/${venv_dir}/bin/python         ${CMAKE_SOURCE_DIR}/${ARG_INPUT_REQUIREMENTS}     )++  elseif(NOT DEFINED ARG_INPUT_REQUIREMENTS AND NOT package_requirements STREQUAL "")+    message(WARNING "Please define an INPUT_REQUIREMENTS and generate a lock file - see https://github.com/locusrobotics/catkin_virtualenv/blob/master/README.md#locking-dependencies")
    message(WARNING "Please define an INPUT_REQUIREMENTS block and generate a lock file - see https://github.com/locusrobotics/catkin_virtualenv/blob/master/README.md#locking-dependencies")
paulbovbel

comment created time in a month

push eventlocusrobotics/catkin_virtualenv

Andrew Blakey

commit sha 006cc9f655818e246eb3b1fdbce13ce3edc0f437

Update README.md (#59) * Update README.md * Update README.md

view details

push time in a month

push eventlocusrobotics/catkin_virtualenv

Andrew Blakey

commit sha 7dfda29b5fa2cd117d6c411ddd7726d4d855a112

Update README.md

view details

push time in a month

PR opened locusrobotics/catkin_virtualenv

Reviewers
Update README.md
+9 -7

0 comment

1 changed file

pr created time in a month

create barnchlocusrobotics/catkin_virtualenv

branch : ablakey-patch-1

created branch time in a month

push eventablakey/chip8

Andrew Blakey

commit sha f21e46c8fb3537ef4db86a8dd19ba558172c2e05

refactor an emulator abstraction in between to more easily allow custom stepping through the emulation.

view details

push time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha 2b18f0a11718754c2d0206e670b75970be18c21e

cleanup

view details

push time in 2 months

Pull request review commentlocusrobotics/aiorospy

Lock requirements

-aiounittest==1.2.1-janus==0.4.0+aiounittest==1.3.1        # via -r /home/pbovbel/locus_dev/src/aiorospy/aiorospy/requirements.in

To confirm, this whole file was generated by the new catkin_virtualenv tooling?

paulbovbel

comment created time in 2 months

Pull request review commentlocusrobotics/aiorospy

Lock requirements

 catkin_package()  catkin_python_setup() -install(FILES requirements.txt+install(FILES requirements.in

Is .in a standard or convention from somewhere?

paulbovbel

comment created time in 2 months

Pull request review commentlocusrobotics/catkin_virtualenv

RST-3172 Refactor catkin_virtualenv to allow locking dependencies

+# -*- coding: utf-8 -*-+# Copyright (c) 2013 - 2014 Spotify AB+# Copyright (c) 2020 Locus Robotics++# This file is part of dh-virtualenv.++# dh-virtualenv is free software: you can redistribute it and/or+# modify it under the terms of the GNU General Public License as+# published by the Free Software Foundation, either version 2 of the+# License, or (at your option) any later version.++# dh-virtualenv is distributed in the hope that it will be useful, but+# WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU+# General Public License for more details.++# You should have received a copy of the GNU General Public License+# along with dh-virtualenv. If not, see+# <http://www.gnu.org/licenses/>.++import os+import re+import subprocess++from . import check_call++PYTHON_INTERPRETERS = ['python', 'pypy', 'ipy', 'jython']+_PYTHON_INTERPRETERS_REGEX = r'\(' + r'\|'.join(PYTHON_INTERPRETERS) + r'\)'+++def find_script_files(venv_dir):+    """Find list of files containing python shebangs in the bin directory. """+    command = [+        'grep', '-l', '-r',+        '-e', r'^#!.*bin/\(env \)\?{0}'.format(_PYTHON_INTERPRETERS_REGEX),+        '-e', r"^'''exec.*bin/{0}".format(_PYTHON_INTERPRETERS_REGEX),+        os.path.join(venv_dir, 'bin')]+    grep_proc = subprocess.Popen(command, stdout=subprocess.PIPE)+    files, _ = grep_proc.communicate()+    return set(f for f in files.decode('utf-8').strip().split('\n') if f)

Don't forget set comprehensions exist.

return {f for f in files.decode('utf-8').strip().split('\n') if f}
paulbovbel

comment created time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha 4b3b4b6cf4a2ac07ac10d2afe5e4cc7e21dcabce

switch to usize for simplicity

view details

Andrew Blakey

commit sha 03b2a38f6649acfd671c170f736993923afae4c8

usize

view details

push time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha 03b2a38f6649acfd671c170f736993923afae4c8

usize

view details

push time in 2 months

create barnchablakey/chip8

branch : switch-to-usize

created branch time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha 8435ce53f9c977ed0228f77b59fa4196a26f3768

progress

view details

push time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha 5c5b38802060695d732aeb30fc25917778e4ceda

Implemented timers. Implemented primitive loop.

view details

push time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha d46d1e339bf26d2b043e5477a9b67455e6f1bf97

working maze. Need another

view details

push time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha 507044295610f17794153b29d605eb6fae2cbc49

progress

view details

push time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha fe94cc9a4571daa63f685090b40ff1a77999c883

consolidate structure to one file as I learn what is and is not possible with Rust separation of Impl's. Added a SDL2 based graphics implementation.

view details

push time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha f4281bf6926581b872cd706c993f085cb5534952

attempt to organize as a module.

view details

push time in 2 months

push eventlocusrobotics/qgis_ros

Romain Reignier

commit sha cd3bf3ef2e50d5ae0e3a681f81302f90c8e19768

Add NavSatFixTranslator and the ability to change CRS per message type (#12) * Add NavSatFixTranslator and the ability to change CRS per message type * Update crs.py Co-authored-by: Andrew Blakey <ablakey@gmail.com>

view details

push time in 2 months

PR merged locusrobotics/qgis_ros

Add NavSatFixTranslator and the ability to change CRS per message type

Thanks a lot of this qgis_ros package, it is quite useful to use QGis to see geographic data.

So I have added a NavSatFixTranslator to use ROS standard sensor_msgs/NavSatFix GNSS receiver messages.

I had to add a new CRS in order to get the points on a correct location on a map, so I have added a crsName member to the Translator base class.

I had to use dicts to store CRS PROJ4 data and QgsCoordinateReferenceSystem objects because the raw PROJ4 string contains spaces and cannot be used in the uri passed to QgsVectorLayer constructor when subscribing to a topic.

+38 -6

4 comments

5 changed files

romainreignier

pr closed time in 2 months

push eventromainreignier/qgis_ros

Andrew Blakey

commit sha d5a98338925e2001c2751b7d4190fffaad128aa2

Update crs.py

view details

push time in 2 months

Pull request review commentlocusrobotics/qgis_ros

Add NavSatFixTranslator and the ability to change CRS per message type

                 +units=m \                 +no_defs' +PROJ4_WGS84 = '+proj=longlat +datum=WGS84 +no_defs'  simpleCrs = QgsCoordinateReferenceSystem('PROJ4:' + PROJ4_SIMPLE)+wgs84Crs = QgsCoordinateReferenceSystem('PROJ4:' + PROJ4_WGS84)++proj4CrsDict = {'simple': PROJ4_SIMPLE, 'wgs84': PROJ4_WGS84}+crsDict = {'simple': simpleCrs, 'wgs84': wgs84Crs}

To confirm, you mean a newline character. Probably a windows vs. linux or code editor detail. I'll add it back in here.

romainreignier

comment created time in 2 months

delete branch locusrobotics/qgis_ros

delete branch : ab-handle-empty-module-names

delete time in 2 months

push eventlocusrobotics/qgis_ros

Andrew Blakey

commit sha e1756afdb8e0e0ee78590953c421a6dc2e4b5a6c

handle translators issues (#13)

view details

push time in 2 months

PR merged locusrobotics/qgis_ros

handle translators issues

A missed fix from a year ago.

This change handles the case where QGIS-ROS attempts to import modules listed in QGIS_ROS_EXTRA_TRANSLATORS but could not be found. Instead, it logs an error and continues.

+15 -4

0 comment

1 changed file

ablakey

pr closed time in 2 months

PR opened locusrobotics/qgis_ros

Reviewers
handle translators issues

A missed fix from a year ago.

This change handles the case where QGIS-ROS attempts to import modules listed in QGIS_ROS_EXTRA_TRANSLATORS but could not be found. Instead, it logs an error and continues.

+15 -4

0 comment

1 changed file

pr created time in 2 months

delete branch locusrobotics/qgis_ros

delete branch : ab-test-install-docker

delete time in 2 months

pull request commentlocusrobotics/qgis_ros

Add NavSatFixTranslator and the ability to change CRS per message type

Thanks for the reminder. That branch should be merged. I'll test this out and then merge both today.

romainreignier

comment created time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha 05f4ad021b8041d8dcdde5e11e84f900149c9d3a

add documentation for opcodes.

view details

push time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha 95aa53364ee4ada819805de44cd9d11247883efc

cleanup

view details

push time in 2 months

pull request commentlocusrobotics/qgis_ros

Add NavSatFixTranslator and the ability to change CRS per message type

Thanks for the contribution!

I am not in a position to test this with NavSatFix data. If you've got a simple testing strategy that's reasonably easy and safe to share, that would be great. Otherwise I will defer to you to decide that this works as intended. The diff looks good to me.

I think there may be a case that if we handle more than 1 CRS, we should be more generic than hard-coding 2 of them. However, I think WGS84 and Simple should cover most robotics + GIS use cases. This is a problem I'm happy to kick down the road.

I'd love to hear more about what you're doing with QGIS-ROS, if you've got any public links/details to share.

romainreignier

comment created time in 2 months

push eventablakey/chip8

Andrew Blakey

commit sha b217158c74ab6d50f4f05f18b50f24216a5c66db

removed utils

view details

push time in 2 months

startednodegit/nodegit

started time in 2 months

startedwolandr/pretty-hex

started time in 3 months

create barnchablakey/chip8

branch : master

created branch time in 3 months

created repositoryablakey/chip8

created time in 3 months

startedkulshekhar/ts-jest

started time in 3 months

more