Henry IX: A fully a...
 
Notifications
Clear all

Henry IX: A fully autonomous robot platform  

Page 3 / 7

BrianG
(@briang)
Trusted Member
Joined: 3 months ago
Posts: 59
Topic starter  
Posted by: @robotbuilder

@briang

My you are moving ahead fast! I guess having a teaching schedule helps.

This is just a guess, but judging by your statement I don't think you have been a professor. 🙂 . And if you are/were, where? I need to check it out.

Regarding utube videos I personally don't find them the best way to review a tutorial. You might get the general gist of the subject matter but after that a written version as with Bill's videos becomes the reference point later. I once put that to another utube guy letting him know his web page was useful but not so much his long winded videos. He made the point he gets paid when people watch his videos but not when they access his web page.

 

I understand, and since I am not going to monetize my channel while my students use it and don't get paid either way I am taking the path that benefits my students and goals the most. Covid forced new tactics to make up for lost face-to-face time. I decided if I was going to try to create content on the video medium I would try to master it as best I could. I am a huge advocate of open source, creative commons, etc. And if I am spending the time and effort to make the material why not try to bring it to as many people as possible. I largely taught myself how to program at a young age with books, bulletin board systems, friends and available source code.  Today it seems (to me) that younger students looking to learn something turn to YouTube and video content whether or not it is the best medium.  My goal is to find the best ways of using the medium, will see how it turns out.

Currently I have chosen to dedicate some extra time to the videos because I needed them anyway and I thought they might also benefit others if i put the extra time in, but unfortunately I do not have to the time to expand beyond that for now.

I hope as I get deeper into them and there is more actual code (the early ones have been introductory, also talking about the robot chassis, dynamics, etc), that they will provide everything you are looking for. Perhaps once I have the basic set down I can circle back to a website and more written content.  All the written content I have is based around a college classroom.  Dumping it on the web without content would be useless, it would all need to be re-imagined.  

Anyway.. sorry i will step off the lectern now, sorry for giving way more of an answer then you asked for.

/Brian


huckOhio liked
ReplyQuote
BrianG
(@briang)
Trusted Member
Joined: 3 months ago
Posts: 59
Topic starter  
Posted by: @robo-pi

@briang

I'm hooked on your videos I will definitely be watching them I think they are very well done.

There are 2 suggestions I'd like to make.  First in your video code in the IDE it would be nice if you increase the font as much as possible without having to wrap lines makes it far easier for me to read the screen with the larger print if possible.

The other suggestion I would make is that when you set up your play lists for your lessons it would be nice if you had bike part one part 2 part 3 of specific things you were doing so easier to find exactly which video I need to look at and I do appreciate you putting the timestamps at the bottom which is very nice.

Unfortunately I'm currently not at home where I can actually work on the physical robots so right now I've only been watching your videos not sure when I will be home it will not be anytime soon.

 

Thank you, both are excellent suggestions.  I have the gist of the second, but I am not sure I followed 100%.  Are you saying break up some longer ones into smaller parts, or just to label the videos with the part numbers in the title? 

/Brian


ReplyQuote
robotBuilder
(@robotbuilder)
Honorable Member
Joined: 2 years ago
Posts: 741
 

@briang

This is just a guess, but judging by your statement I don't think you have been a professor. 🙂 . And if you are/were, where? I need to check it out.

No I am not an educator nor have I ever worked in the electronics or programming profession. I have no formal education. I am self taught in basic electronics and programming. It is purely an occasional hobby for me.

https://forum.dronebotworkshop.com/introductions/hi-2/
https://forum.dronebotworkshop.com/user-robot-projects/k8055-robot/#post-4101

Looking at a video of my Mega test robot base doing a square manoeuvre using the encoders I noticed it is dated 15/7/2019 so it has been a long time since I last did some serious work on the robot project.

 


ReplyQuote
BrianG
(@briang)
Trusted Member
Joined: 3 months ago
Posts: 59
Topic starter  

Well it is good to know you 🙂

I only went back for my education later.. lifelong tinkerer.

I am going to have to read more tomorrow, I like that you thought to use the laptop not just for it's abilities as a full computer, but also for expression (faces)

Question, what is the k8055? Is that the controller board? 

 

/Brian


ReplyQuote
robotBuilder
(@robotbuilder)
Honorable Member
Joined: 2 years ago
Posts: 741
 

@briang

It allowed you to control hardware via the USB port using your own programs.

https://www.velleman.eu/products/view/?country=be&id=351346&lang=en

Now I can use the Arduino to control hardware with my own programs running on a PC or RPi via the USB port.

In the case of the RPi they provide software to use the GPIO pins as well.

 

This post was modified 2 months ago by robotBuilder

ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 2 years ago
Posts: 1909
 
Posted by: @briang

Are you saying break up some longer ones into smaller parts, or just to label the videos with the part numbers in the title? 

I was just thinking of labeling the videos with part numbers in some type of chronological order where we could be sure we get the proper ones first before moving on I don't think the videos are too long at all.

DroneBot Workshop Robotics Engineer
James


BrianG liked
ReplyQuote
BrianG
(@briang)
Trusted Member
Joined: 3 months ago
Posts: 59
Topic starter  
Posted by: @robotbuilder

@briang

It allowed you to control hardware via the USB port using your own programs.

https://www.velleman.eu/products/view/?country=be&id=351346&lang=en

Now I can use the Arduino to control hardware with my own programs running on a PC or RPi via the USB port.

In the case of the RPi they provide software to use the GPIO pins as well.

 

Okay, and that is the Freescale BASIC?

/Brian


ReplyQuote
robotBuilder
(@robotbuilder)
Honorable Member
Joined: 2 years ago
Posts: 741
 

@briang

I have not heard of Freescale?

I use FreeBASIC but you can use C++ or Python or Processing and so on ...

Back in Aug 2019 I had intended making my own commands (functions in some PC computer language) for pc i/o control (superior version of K8055 board) using an Arduino but ran out of drive to keep working on the project.

The example below is a simple experimental first step FreeBasic version to turn LEDS on or off and detect if a button switch was pressed to test the pc to Arduino USB link was working.  Essentially it is your own version of the Serial Monitor used by the Arduino IDE except your program generates the commands and reads the inputs.

If you pressed the [1] key on the pc the led would turn on and if you pressed the [2] key the led would turn off. If you pressed the [9] key the pc would receive the state of the button switch. The idea is to write functions to send commands to the Arduino or read data from the Arduino while the pc or RPi program does all the high level stuff like vision, voice communications, planning and so on.

You have to program the Arduino to act on those commands just like the K8055 does.

screenres 640,480,32

Dim As Long fn = FreeFile
Dim As String com_cmd = "COM3:9600,n,8,1,cs0,ds0,cd0,rs"

If Open Com(com_cmd As #fn) <> 0 Then
    Print "Error opening COM3"
    Sleep 2000, 1
    Cls
    End 1
End If

dim as string outData, inData
Dim As boolean state = TRUE ' send (if FALSE receive)

do
    If state Then
        outData = ""
        Input "Enter command"; outData
        print #fn, outData ' SEND DATA
        state = FALSE
        print "STATE =";state
    Else
        While LOC(fn) = 0 ' wait until ARDU responds
            Sleep 20 ' (forever, if no answer!)
        Wend
        inData = ""
        while Loc(fn) > 0
            inData += Input(1,#fn)
        Wend
        print inData
        state = TRUE
        print "STATE =";state
    End If

    Sleep 20
loop until outData = "q" 'multikey(&H01)

Close #fn

 

 

int serialData = 0;
const byte LED1 = 30;  // pin number
const byte BTN1 = 22;  // pin number

void setup()
{
  pinMode(LED1,OUTPUT);   // LED
  pinMode(BTN1,INPUT);    // BUTTON
  
  Serial.begin(9600);  
}

void loop()
{

  if (Serial.available() > 0)
  {
    serialData = Serial.read();  //get command

    // command to turn on LED
    if (serialData == '1'){
      digitalWrite(LED1,HIGH);
    }

    // command to turn off LED
    if (serialData == '2'){
      digitalWrite(LED1,LOW);
    }

    // command to read button value and return to PC
    if (serialData == '9'){
      Serial.print(digitalRead(BTN1));
    }

    // returns command sent
    Serial.print(serialData);  //return command

  }  
}

 

 

 

 

 

This post was modified 2 months ago by robotBuilder

ReplyQuote
BrianG
(@briang)
Trusted Member
Joined: 3 months ago
Posts: 59
Topic starter  

That is a great idea.

I used to do something very similar in an older project where I had an Arduino communicating with an Android phone using serial over a basic bluetooth connection.  The Arduino side looked like this:

(sorry about the lack of blocking, it was fighting me pasting it in..)

void taskRecieveData(void) {
// set the array index pointer
short index = 0;

char inChar;
if(Serial.available() > 0)
{
while(Serial.available() > 0 && index < maxMessageSize-1)
{
inChar = Serial.read();
readSerialBuffer[index] = inChar;
index++;
readSerialBuffer[index] = '\0'; // Add a null at the end
}
}

// get the size of our current buffer
int bufferSize = sizeof(readSerialBuffer) / sizeof(int);

// debug the string
//for(int i=0; i<bufferSize; i++) {
// Serial.print(readSerialBuffer[i]);
//}

/*
*we have the data, parse it for the information we want
*/
// check for new robot state
for(int i=0; i<bufferSize; i++) {
// check for the first character
if(readSerialBuffer[i] == 'S') {
i++;
// check for the second character
if(readSerialBuffer[i] == 'T') {
i++;

int value = (int) readSerialBuffer[i];

if(value == 48) {
currentState = WAITING;
}
else if(value == 49) {
currentState = ROAMING;
}

else if(value == 50) {
currentState = TRAVELING;
// temp hard code destination
pMyWorld->targetX = 5.0;
pMyWorld->targetY = 30.0;
}


}
}
else if(readSerialBuffer[i] == 'C') {
i++;
// check for the second character
if(readSerialBuffer[i] == 'X') {
i++;

int value = (int) readSerialBuffer[i];

// going to have to deal with getting more then one character
// going to have to deal with converting the 'chars' retrieved into ints for the current x,y destinations.
// for now i am hard coding a destination in the change to state traveling.

}
else if(readSerialBuffer[i] == 'Y') {

}
}
}

// clear the buffer
for(int i=0; i<bufferSize; i++) {
readSerialBuffer[i] = '\0';
}
}


void taskTransmitData(void)
{
// start the xml
Serial.print("HE");
Serial.print(pMyMemory->currentHeading);
Serial.print("/HE");
Serial.print("FR");
Serial.print(pMyMemory->forwardRange);
Serial.print("/FR");
Serial.print("LS");
Serial.print(pMyMemory->leftSpeed);
Serial.print("/LS");
Serial.print("RS");
Serial.print(pMyMemory->rightSpeed);
Serial.print("/RS");
Serial.print("TI");
Serial.print(pMyMemory->turretIndex);
Serial.print("/TI");
Serial.print("CD");
outputCurrentDistances();
Serial.print("/CD");
Serial.print("CM");
outputCurrentMagnitudes();
Serial.print("/CM");
Serial.print("XP");
Serial.print(pMyWorld->x);
Serial.print("/XP");
Serial.print("YP");
Serial.print(pMyWorld->y);
Serial.print("/YP");
Serial.print("XT");
Serial.print(pMyWorld->targetX);
Serial.print("/XT");
Serial.print("YT");
Serial.print(pMyWorld->targetY);
Serial.print("/YT");
Serial.print("CS");
Serial.print(currentState);
Serial.print("/CS");

Serial.println();

}

The result was that you pressed buttons on the app and it transmitted to the Arduino that responded.. just like your keyboard presses.

/Brian


ReplyQuote
robotBuilder
(@robotbuilder)
Honorable Member
Joined: 2 years ago
Posts: 741
 

@briang

(sorry about the lack of blocking, it was fighting me pasting it in..)

If you are using the Arduino IDE press right mouse button and Select All then press right mouse button again and Copy as HTML. Now in the forum reply make sure you hit the Enter a few times to make room to insert the code then select {;} which allow you to insert source code. A window will pop up and each clean line will be seen as <p></p> Put cursor between them and right click mouse and choose Paste.

 

This post was modified 2 months ago by robotBuilder

BrianG liked
ReplyQuote
robotBuilder
(@robotbuilder)
Honorable Member
Joined: 2 years ago
Posts: 741
 

robotBuilder wrote:
Are you going to install and use the Robot Operating System?

briang wrote:
Yes, I believe so. I am defiantly going to be evaluating it for the visual odometry and it would probably offer a good slam solution as well.

The software engineer in me however might end up re-engineering the wheel just to have the experience 🙂

 

There is a ROS forum in the DroneBot Workshop forums however I found it too hard to follow.

"ROS is pretty hard to learn" says this guy, James Bruton, and he is pretty up to speed on robotics.

 

This post was modified 2 months ago by robotBuilder

BrianG liked
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer Moderator
Joined: 2 years ago
Posts: 1909
 
Posted by: @robotbuilder

"ROS is pretty hard to learn" says this guy, James Bruton, and he is pretty up to speed on robotics.

I think a lot of people don't understand what ROS truly is, it's an industrial robotic operating system.

It's not really designed for individuals who are writing their own code and creating their own hardware.

Hobbyist are probably better off writing their own personal version of a robot operating system.

Just my thoughts for whatever they might be worth, I could be wrong.

 

DroneBot Workshop Robotics Engineer
James


hstaam liked
ReplyQuote
Mr Owl
(@mr-owl)
Eminent Member
Joined: 1 year ago
Posts: 33
 

@BrianG @huckOhio @robo-pi

Brian  FYI -tuning back in  Been building the DB1 robot  as a learning curve ( with help from "huck") . i will kept developing it as learning tool just in case Bill ever resurrects the project  However I'll monitor your posts(progress)  Will be interested in your video's to help me learn, develop another  workable platform and be a better conduit to the students I advise and mentor - see attached 

Don't usually upload non technical stuff but for this one instance  -l great bunch of kids - my motivation 

Any related subject matter would be off line going forward 

 

studentssnapshot

 


BrianG liked
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 2 years ago
Posts: 1002
 

@mr-owl

You somehow managed to make the same post twice and I could not discern any difference in the two, so I have deleted the first post and left the second post intact.

Not a big issue but I saw no need for two of the same thing, and considering it had an attached picture, felt no harm was being done by deleting one of the posts. 

SteveG


ReplyQuote
BrianG
(@briang)
Trusted Member
Joined: 3 months ago
Posts: 59
Topic starter  

@robotbuilder

Thank you, I actually took some time over the weekend to reflash my tx2 with the laters L4T (linux for tegra) the host image and the latest CUDA suite (manages the GPUs).  I then got it set up so that I could VNC into it so I can manage everything from my desktop.  I also got the A2 working on it (using the example code provided) and installed ROS melodic on the Jetson (the Jetson uses ubuntu 18.04 so I have to stick with the slightly older ROS).  So far so good, but man ROS is a bit to wrap your head around.  This video and the links he provided are going to be helpful.

/Brian


ReplyQuote
Page 3 / 7