Giter Site home page Giter Site logo

sphero-sdk-raspberrypi-python's People

Contributors

anthonyv44 avatar dependabot[bot] avatar evankrall avatar jim-konish avatar jkonish avatar johnabascalsphero avatar meganrobinson22 avatar mica-angeli avatar timgilbert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sphero-sdk-raspberrypi-python's Issues

Can't change port with python SpheroRvrObserver

With the asyncio code I can properly set the port the Pi should use to communicate with the RVR (my Pi is set up as a USB Serial Gadget).

rvr = SpheroRvrAsync(
    dal=SerialAsyncDal(
        loop,
        port_id = "/dev/ttyGS0"
    )
)

SpheroRvrObserver, however, does not accept a dal parameter and so changing the port is not possible. Could this be added as an option?

RVR does not communicate

When I install the dependencies and I run any example script the RVR doesn't not complete the action I wanted it to. The wires are connected correctly and the script does not return any errors. I am using python 3.9 and a raspi 3B+

pip not installed on Raspian lite

I am working with Raspbian Lite fresh install.
After running first-time-setup and reboot the pipenv --python /usr/bin/python3.7 command comes back with error

-bash: -bash:: command not found

python -m pip install pipenv

So when it tries to run this python -m pip install pipenv from the first time script it says

no module pip found

I had to manually run sudo apt-get install python-pip and then manually run the install pip command

Is there something in the manual about not using Lite version? I must have missed it?

Expose motor encoder values via SDK

I tried to find if there was a way to read the motor encoder values but was unable to find a way to do so. Can you point me in the right direction or consider this as a feature request to expose the encoder values. This is extremely useful for using RVR with basic SLAM or dead-reconning algorithms that depend on or can be enhanced by odometry.

Argument order issue in drive_control_async.py

asyncio.contols.drive_control_async.py

In the class DriveControlAsync the definition of the function __timed_drive is
__timed_drive(self, speed, heading, flags, time_to_drive)

However in both the drive_backward_seconds & drive_forward_seconds function when they call __timed_drive they use the argument order (heading, speed, flags, time_to_drive)

This results in the values of heading and speed being swapped, and unexpected behaviour of the robot.

Could Not Open Port /dev/ttyS0

I was getting serial.serialutil.SerialException could not open port /dev/ttyS0 when running code.

In Raspberry Pi, I checked /boot/config.txt and saw that enable_uart=1 was indeed set.

I checked /dev/ and found no ttyS0 but instead did see ttyAMA0.

I went in to the observer client and changed the port to serial0 instead of ttyS0. This worked for me.

Here is the change I made to fix this issue.

Kinvert@9f641e2

Not sure if my problem is a common one or if it was specific to me. I was under the impression that generally when setting enable_uart=1 that ttyS0 should show up. I do have a new Raspbian install.

Doesn't work with Raspberry Pi 4b

I have installed the Sphero SDK on my Raspberry Pi 4, when I run the program it says "Checking RVR firmware versions..." then quits without running it. What should I do?

Rvr classes block all default logging making integration to existing projects difficult

To reproduce (based on getting_started/asyncio/driving/drive_raw_motors.py):

import asyncio
import logging
from sphero_sdk import SpheroRvrAsync
from sphero_sdk import SerialAsyncDal
from sphero_sdk import RawMotorModesEnum

# setup and test logging
logging.getLogger().setLevel(logging.INFO)
logging.info("Now the default logging works")

loop = asyncio.get_event_loop()
rvr = SpheroRvrAsync(
    dal=SerialAsyncDal(
        loop
    )
)

logging.info("Now it does not")

This result is probably not intended, because it makes integration with existing projects more complicated.

The behavior is caused by logging_config.py's 'null_handler', so the workarounds are ether to set SpheroRvrAsync's
log_level to 2, which also cause other additional logs from the rover or to remove the 'null_handler' handler with

null_handler = [h for h in logging.getLogger().handlers if h.name == "null_handler"][0]
logging.getLogger().removeHandler(null_handler)

after the RVR has been initialized.

The proper solution would probably be to create and use a new named logger for the sdk, and block that when using
LogLevel.Silent.

Is this code still maintained?

The title. It seems as if Sphero have either abandoned or stopped working on this SDK. Personally I've had many issues trying to get it to work. Would just like to know if anyone else has recently gotten this to work. I'm using a raspberry pi 3B+ with debian lite. (I am only using ssh.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.