Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: Semi-Scratch Built HROS1 Inspiratron (baymax vs .001)

  1. #21
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    99

    Re: Semi-Scratch Built HROS1 Inspiratron (baymax vs .001)

    should I run the sudo make all command? Duh...guess so.

  2. #22
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    99

    Re: Semi-Scratch Built HROS1 Inspiratron (baymax vs .001)

    OK...so sudo make all made it so that ps3_demo stopped working...

    I commented out the line and it works again, so I think I probably inserted it wrong. below is what I commented out to get things working again. :-(

    Code:
       {
       Action::GetInstance()->Start(15);
       while(Action::GetInstance()->IsRunning()) usleep(8*1000);
       }
        while(1)
       {
         // usleep( 10000 );
          StatusCheck::Check(cm730);
      if(StatusCheck::m_is_started == 0)
            continue;
       }
        return 0;
    }
    int GetCurrentPosition(CM730 &cm730)

  3. #23
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    99

    Re: Semi-Scratch Built HROS1 Inspiratron (baymax vs .001)

    In other news...Inflatable suit inflating

  4. #24

    Re: Semi-Scratch Built HROS1 Inspiratron (baymax vs .001)

    Quote Originally Posted by darkback2 View Post
    OK...so sudo make all made it so that ps3_demo stopped working...

    I commented out the line and it works again, so I think I probably inserted it wrong. below is what I commented out to get things working again. :-(

    Code:
       {
       Action::GetInstance()->Start(15);
       while(Action::GetInstance()->IsRunning()) usleep(8*1000);
       }
        while(1)
       {
         // usleep( 10000 );
          StatusCheck::Check(cm730);
      if(StatusCheck::m_is_started == 0)
            continue;
       }
        return 0;
    }
    int GetCurrentPosition(CM730 &cm730)
    Any updates on this? It looked like you inserted it at the right spot, which should not stop stuff from working. As I mentioned I added the delay in the StatusCheck::Check code. But I also updated the PS3 code completely... You might reduce the delay time from 10000 to maybe 1000, it will still drop the CPU usage down to almost nothing.

    I keep meaning to take another pass through this code and clean up some stuff. For example, there is no purpose to the code:
    Code:
      if(StatusCheck::m_is_started == 0)
            continue;
    The continue will take you to the end of the while statement which is where it is at anyway...

    Kurt

  5. #25
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    99

    Re: Semi-Scratch Built HROS1 Inspiratron (baymax vs .001)

    Thanks for the help Kurt. I will delete the commenting out part and change it to 1000.

    DB

  6. #26
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    99

    Re: Semi-Scratch Built HROS1 Inspiratron (baymax vs .001)

    So I finally got to edit the code again removing the comment lines and got this warning...

    It seemed to work, but it is still freezing after walking for a little bit...When it freezes is random and it needs to be reset in order to work again.

    Code:
    main.cpp: In function ‘int main(int, char**)’:
    main.cpp:50:7: warning: unused variable ‘trackerSel’ [-Wunused-variable]
    g++  StatusCheck.o main.o ../../lib/darwin.a -o demo -g -lpthread -ljpeg -lrt -lbluetooth
    chmod 755 demo

  7. #27
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    99

    Re: Semi-Scratch Built HROS1 Inspiratron (baymax vs .001)

    Now I am wondering...the lock up thing only seems to happen when the robot is walking.

    Could this be an issue with the IK?

    Does this suggest that it is really a bad wire somewhere?

    Unfortunately walking around with a puffy suit on makes looking for things like servos turning on or off really difficult. On the flip, the legs seem to stay nice and cool with those fans blowing on them. :-)

    DB

  8. #28

    Re: Semi-Scratch Built HROS1 Inspiratron (baymax vs .001)

    My guess is it could be lots of things.

    Could be electrical: like a brownout of one of the components or a bad connection...

    Could be firmware: Some issue with the Cm... controller?

    Or could be code issue with the code running on RPI: For example it could be spinning in a loop waiting for some event that does not happen or already did happen...

    Sounds like time to start debugging. I would probably try a few different approaches, including:

    a) Look over the code and sprinkle some output printf statements at key locations, to get an idea if the code is getting to some location to try to localize down where it is hanging and potentially what values it is seeing...

    b) Cheat: I have WinGDB installed on my PC, which allows me to do some source level debugging of the stuff running on the RPI2. If it hangs, you can tell the window to break into all threads and see where the code actually is. I was also thinking that when I try running this code base using an Edison instead of RPI, I may setup an Eclipse workspace for all of the HROS1 code and the Eclipse setup also is setup to do remote debugging.

    c) Check out some of the other HROS1 users and see if they have their own forks of the code that may have some fixes in it. However you may need to distinguish those changes made are they actual fixes for the code base or are they fixes to work specifically with the Beta 1 HR-OS1.

    Also sounds like a potential for a group debug session, like with Hangout.

  9. #29
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    99

    Re: Semi-Scratch Built HROS1 Inspiratron (baymax vs .001)

    So...To that end, Me...

    I have a strange background for a high school robotics teacher. While I have always had an interest in electronics and computers, I didn't really get into this stuff until graduate school. In college I was a music major. I concentrated in Electronic and post modern music. I thought I was going to be a recording engineer or composer. Then I went to Calarts where I majored in composition with new media. Basically computer music and interactive design. That was when I really got my start in robotics.

    Over the past five years I have been working on my "flagship" robot Hikari. She is really a better example of my capabilities.

    My struggle with the HROS-1 in part stems from the fact that I am really jumping into this project near its end. I don't know enough to know where to start looking to figure out what I am looking at.

    I've decided to start by annotating the code. The question is, where would make the most sense as a good starting point. Looking at the PS3_demo Main program it looks like a lot of calls to other programs. Is there a diagram showing the overarching software layout?

    DB

  10. #30

    Re: Semi-Scratch Built HROS1 Inspiratron (baymax vs .001)

    Sounds like a very interesting path!

    I have not seen anything here that fully documents the code. I think there are bits and pieces out there. For example a lot (most? ) comes from Robotis and there is probably some documentation on it up somewhere on their sites. For me I mostly figure out by reviewing the code.

    As to how/where to annotate the code.

    Could start off with some simple thing at the start of StatusCheck::Check. Could be a simple printf statement, or if you are setup with something like a logic analyzer, could be something like toggling an one of the external IO pins. So if then run your program and it hangs walking, are you still seeing events? If not, you know it may be hung in some inner loop. If yes, well...

    Note: My version of these files have changed a reasonable amount as I replaced the PS3 code with my own and also updated the indention...

    I would probably go into statuscheck file where it says PS3 RC Control Code and uncomment some of the printfs here to again see the data, especially when it then hangs.

    Depending on what you find, I would then maybe start instrumenting the MotionManager including walking... Have not gone done much in here yet, so not sure where.

    Some other things I do include: Run a 2nd terminal window and run something like htop in it. (May have apt-get install it). This shows you how busy each of the processor threads are. So if something hangs in a hard loop, it should show a thread completely utilizing a processor core.

    Kurt

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. HROS1 Simulator, is Darwin OP similar enough?
    By Johnny in forum HR-OS1 Development and Discussion
    Replies: 2
    Last Post: 07-29-2016, 03:40 AM
  2. HROS1 RPi and ArbotixPro communication
    By az139 in forum Arbotix, Microcontrollers, Arduino
    Replies: 6
    Last Post: 08-24-2015, 01:03 AM
  3. Building one from scratch?
    By dmcman73 in forum HR-OS1 Development and Discussion
    Replies: 7
    Last Post: 07-03-2015, 02:21 PM
  4. HROS1 - Wifi stopped working?
    By KurtEck in forum Humanoids, Walkers & Crawlers
    Replies: 8
    Last Post: 05-20-2015, 09:54 AM
  5. Scratch built hex
    By MaconSwift in forum Robotics General Discussion
    Replies: 3
    Last Post: 01-20-2010, 12:49 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •