PacktPublishing / PacktPublishing/Learn-Robotics-Programming-3rd-edition

Distance Sensor not working

Open
#28 36 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
23
Forks
11
Avg merge
12h 59m
Merged PRs (30d)
5

Description

It used to work, but now it doesn't.
When I say it used to work, I mean that it worked (and still works) with the 32-bit Lite OS and the 64-bit Lite OS.
When I say that now it doesn't, I mean that it doesn't work with the 64-bit Full OS.

Image

I click on start distance data but I don't get any distance_mm values.

Image

The sensor (kind of) works. The first time I run robotpython robot/tests/test_distance_sensor.py, it just prints "Initializing distance sensor...".

If I close that ssh session and try again, it works:

doug@raspi4:~ $ robotpython robot/tests/test_distance_sensor.py
Initializing distance sensor...
Setting distance sensor resolution and frequency
Starting distance sensor ranging
71 75
73 72
74 71
71 73
74 72
76 71
75 71
74 73
72 75
74 73
74 72
72 71
76 75

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue on the 64-bit Full OS and compare it with the working 32-bit and 64-bit Lite OS setups. Start with robot/tests/test_distance_sensor.py and the reported first-run behavior; done means the sensor produces distance_mm values reliably on the 64-bit Full OS.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python, raspberry-pi
Domain
embedded-iot, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.