Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 02:14
    haltonstemclub commented #1219
  • Jan 18 11:19
    xdsl commented #1457
  • Jan 16 09:48
    skyaee commented #1359
  • Jan 13 19:01
    dlech closed #1462
  • Jan 13 18:44
    Amplifon1 commented #1462
  • Jan 13 18:39
    dlech commented #1462
  • Jan 13 18:38
    Amplifon1 labeled #1462
  • Jan 13 18:38
    Amplifon1 opened #1462
  • Jan 12 07:04
    sgalzin commented #905
  • Jan 12 07:02
    sgalzin commented #905
  • Jan 10 14:10
    xdsl commented #1458
  • Jan 10 12:55
    xdsl commented #1442
  • Jan 06 17:44
    Aromik closed #1461
  • Jan 06 17:17
    jabrena closed #1460
  • Jan 06 17:17
    jabrena commented #1460
  • Jan 06 17:13
    dlech commented #1461
  • Jan 06 17:09
    Aromik commented #1461
  • Jan 06 16:55
    dlech commented #1460
  • Jan 06 16:55
    dlech commented #1460
  • Jan 06 16:43
    dlech labeled #1461
can you add an issue for every NXT sensor that you are interested to use?
jchristof
@jchristof
@jabrena thanks - your response clarified that for me. Let me take a look at how the supported EV3 sensors work in the java library now that I know it just a matter of adding support in the Java project.
Juan Antonio Breña Moral
@jabrena
Oki Sir
David Walend
@dwalend

@JakubVanek , @jabrena - I'm using ev3dev-lang-java:2.6.2-SNAPSHOT - on an EV3, not overclocked, with the stock ev3dev OS SDD card. It does touch the lejos SampleProvider to use the gyro sensor, but that seems to pass right though to Sysfs.readFloat(...).

The java code below runs in about 100 to 140 milliseconds per iteration. Similar code using the ev3 classroom from LEGO runs each iteration in 2 to 4 milliseconds. My question is - is the delay in the ev3 os streaming implementation, or in ev3dev-lang-java:2.6.2-SNAPSHOT code that reads and writes those streams? That'll tell me what to try first to speed it up.

If it's at the OS level then probably the best I can do is read and write the buffers in parallel. If it's in Java IO then maybe a JNI approach or an NIO loop could help.

@JakubVanek - please try something similar in c++ if you have a spare moment. That'll likely answer.

Thanks,

David

```

import ev3dev.actuators.ev3.EV3Led;
import ev3dev.actuators.ev3.EV3Led.Direction;
import ev3dev.actuators.lego.motors.EV3LargeRegulatedMotor;
import ev3dev.sensors.EV3Key;
import ev3dev.sensors.ev3.EV3GyroSensor;
import lejos.hardware.port.MotorPort;
import lejos.hardware.port.SensorPort;
import lejos.robotics.SampleProvider;

public class TimingTest {

    //equivalent loop on just ev3 classroom is .3.6 / 100 = 0.0036 per iteration = 3.6 milliseconds - so it's a factor of about 100x
    public static void main(String[] args) {
        EV3LargeRegulatedMotor leftMotor = new EV3LargeRegulatedMotor(MotorPort.B);
        EV3LargeRegulatedMotor rightMotor = new EV3LargeRegulatedMotor(MotorPort.C);
        System.out.println("motors created");

        EV3GyroSensor gyroSensor = new EV3GyroSensor(SensorPort.S2);
        SampleProvider gyroSampleProvider = gyroSensor.getAngleMode();
        float[] gyroArray = new float[gyroSensor.sampleSize()];
        System.out.println("gyro created");

        warmUp(gyroSampleProvider,leftMotor,rightMotor);

        long[] timingResults = new long[10];
        for(int i = 0 ; i < timingResults.length ; i++) {
            long startTime = System.currentTimeMillis();

            //readHeading
            gyroSampleProvider.fetchSample(gyroArray, 0);
            float heading = gyroArray[0];
            //read each motor's odometer
            int leftOdometer = leftMotor.getTachoCount();
            int rightOdometer = rightMotor.getTachoCount();
            //set each motor's speed
            leftMotor.setSpeed(0);
            rightMotor.setSpeed(0);

            long endTime = System.currentTimeMillis();
            timingResults[i] = endTime - startTime;
            //todo set the array value

        }
        long total = 0 ;
        for(long r : timingResults ) {
            System.out.println(r);
            total = total + r;
        }
        System.out.println("average is "+(total/timingResults.length))   ;
    }
Juan Antonio Breña Moral
@jabrena
Hi @dwalend, please open a ticket about your performance request. In relation to the C++ idea, the whole project use Java and we are going to continue in that way. We could review JNI or NIO. I would like to receive your prototypes too from your side.
David Walend
@dwalend
David Walend
@dwalend
@jabrena , @JakubVanek - my question about C++ is to get timing results from that. It'd cut the Java IO layer out of the works. If best-practice code in C++ still runs on the order of 100 milliseconds then that brackets the performance issue as an OS limit; a parallel processing thread is the only way forward without going lower-level than the OS. If the test runs on the order of 2-4 milliseconds then a JNI or NIO loop should work well.
Juan Antonio Breña Moral
@jabrena
Put that details in the issue. Dont use both channels. That conversation need to appear in the issue. Regards
Ken Williams
@kenahoo

Question about ssh-ing to the ev3 device - I tried to set up RSA-key ssh, but it always reverts to password authentication. I know this is always treacherous to get the permissions right - my permissions for the ~/.ssh directory on the brick are:

$ ls -al ~/.ssh
total 12
drwx------ 2 robot robot 4096 Dec  4 03:59 .
-rw-r--r-- 1 robot robot  222 Dec  4 03:59 id_rsa.pub

Normally I'd look at /var/log/auth.log to see what's happening, but that file's not around. Any advice?

David Lechner
@dlech
@kenahoo the public key needs to be in a file named ~/.ssh/authorized_keys on the EV3.
RvanderSpank
@RvanderSpank
Hello. I want to dowload the instructions for building an lego robot (EV3-print3rbot) with my children, but when I press the button "instructions" on https://www.ev3dev.org/, then I get a dropbox-page. Is this normal? I don't know if I can download the instructions if I have dropbox, but I haven't.
RvanderSpank
@RvanderSpank
On the "dropbox-page" it gives "error 404". Does anyone have a pdf so we can start building?
Mohamed Sahbi Charradi
@charradi.sahbi_gitlab
hi friends
DALEK-77
@DALEK-77
hi, is it still possible to use an older version of node.js on stretch? i've been trying to get a snake game to work
David Lechner
@dlech
probably not very easily
DALEK-77
@DALEK-77
yeah.. i couldn't get it to work
also, is there a way to translate tkinter to ev3 lcd calls? im thinking of using a python version
DALEK-77
@DALEK-77
how do i get netris working with the built-in buttons? the lua script for button mapping crashes and burns every time.
DALEK-77
@DALEK-77
nvm, i fixed it
DALEK-77
@DALEK-77
how do i install doom
David Lechner
@dlech
I don't think it works because of the screen size
DALEK-77
@DALEK-77
ye
DALEK-77
@DALEK-77
how about running off the ev3?
jchristof
@jchristof
I've had success compiling and running the examples at ev3dev-lang-cpp directly on the BrickPi but I'd like a better workflow using a cross compiler. I just took a shot at using the windows subsystem for linux build examples. Now when I scp the executable to the PI I get an error that the compile and runtime glibc don't match. Makes sense, but could someone advise - should I be compiling against a different version or installing a different version on the PI?
robot@ev3dev:~$ ./drive-test
./drive-test: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.27' not found (required by ./drive-test)
David Lechner
@dlech
jchristof
@jchristof
@dlech thanks David I will look
Thomas Kienlen
@kmmndr
Hi all :-)
I'm beginner on ev3dev, and I'm trying to start Ev3 (large and medium) motors
They seem to be properly detected, but are unable to start using 'run-forever' command. The state is 'running stalled'
Any idea ? Am I missing something ?
David Lechner
@dlech
What speed did you use? If the speed is not high enough, the motor cannot start.
Thomas Kienlen
@kmmndr
Yesss ! @dlech the speed was missing, thank you very much !
Olivier Martin
@omartin2010
long time, team... is anyone looking for BrickPi3 boards? I have 4 that I'm looking at selling for not a whole lot... any reasonable offer I would entertain... let me know!! :)
Mohan Palanisamy
@mohankrr
Hi.. can ev3dev be used with raspberry pi without a brickpi or pistorms? VFor example e: if I connect a lego nxt motor wires to specific pins on the raspberry pi, will I be able to use the tachomotor class to control/read ?
@omartin2010 I would be interested.. should I email you somewhere?
Olivier Martin
@omartin2010
hi @mohankrr, email me at omartin@live.ca. To your question above, I doubt you can without the brickpi, it's kind of the objective of the board, that is to provide a microcontroler that can move the tachomotors properly, and make the physical interface between the SPI calls and the motors. I'm certain @dlech or others can provide more clarity here
David Walend
@dwalend
What should I read to learn about manipulating the brickman menu? I'd like to put a program at top level.
David Lechner
@dlech
To do that, you would have to build your own custom version of Brickman. Source code is here: https://github.com/ev3dev/brickman/tree/ev3dev-stretch
Although it is probably easier to just prefix the folder name with an _ so that it appears at the top of the list in the file browser.
David Walend
@dwalend
That's the sort of hack I'm looking for. The rest can be some vague feature request, mostly mitigated by running our program at start-up. Thanks @dlech !
Jan-Jaap Fahner
@jjfahner
Hey, trying to setup wifi on boot, I configured my network in /etc/connman/main.conf.ev3dev but it's still connecting to the temp network I set up because password entry is really slow on the brick (Win10 is not connecting over cable, lots of other trouble there). Anyway, where does Brickman (or connman) save the wifi network(s) that you set up using Brickman?
Jan-Jaap Fahner
@jjfahner
Alright, that was very confusing - turns out connman also saves stuff in /var/lib/connman, and that seems to take precedence over anything you setup in /etc/connman/main.conf. If possible, I'd like to suggest updating main.conf to indicate that this is the case.
Lars Möllendorf
@lmoellendorf
Hi, I like to program in C. I am using Linux on my Laptop (host) and I want to use cmake to manage my C project. I saw https://github.com/in4lio/ev3dev-c which provides C libraries and https://www.ev3dev.org/docs/tutorials/using-docker-to-cross-compile/ which explains how to use docker for cross compiling. However, I still wonder how I can use a docker based cross compiler together with cmake?
David Lechner
@dlech
The cross-compile image contains a toolchain file for cmake. Try adding -DCMAKE_TOOLCHAIN_FILE=/home/compiler/toolchain-armel.cmake