Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

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

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

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

    Wow! Thanks man. I'll try that first thing tomorrow!

  2. #12

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

    Quote Originally Posted by r3n33 View Post
    Oh there is a bug with PS3 demo where it uses 100% cpu due to a while loop with no delay in processing. Just before line 206 in ps3_demo/main.cpp add
    Code:
    usleep( 10000 );
    Hopefully that helps. The other thing I'm thinking it sounds like is a lack of comms between the RPi2 and the CM730.
    Yah - I forgot about that one. Earlier when I rewrote the PS3 code base as to not require running as the root, I put the delay into the check controller code instead of in main, but same difference.

    If you want to take it look, it is up in my Use-my-joystick-controller branch of my fork... My code also works like the ROS joystick code that if it loses the joystick object it will try to reopen it. Likewise it does not require the object to be created before the program runs... I also like I can simply rerun the test program and not have to kill and restart the controller code. Warning - I have not yet tested it on the Edison.

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

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

    so I want to edit the CPP file but I'm not really sure what I am doing... so what I tried was from the command line going into the project folder and typing edit main.cpp. so then a whole bunch of code comes up and that is about where I am lost. Really I need a code editing program or to copy the files off of the robot to edit them on my pc. I could do that in about 10 seconds using the code editing software I use on my computer, but in Linux I am completely lost. Think of me as the end user from hell. :-)

  4. #14

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

    A couple of options here:
    1) Setup to use Putty (or now I am using Kitty) and WinSCP. You can connect up to your RPI with WinSCP, double click on the file which will upload it to your pc into a text editor (you can setup which one), where you can make the changes and when you do a save, winscp will download it back to the RPI2...

    1a) Make the changes to your local sources on your PC and download the file using winscp...

    2) Use a text editor on the RPi2. I often use the old vi program (or vim), but this is not the most obvious editor to figure out how to use. But can be done by: entering commands like:
    Code:
    :206
    which will move you to line 206.
    You can then use the arrow keys to move around. To insert or append text hit either the i or the a key. You can then still move around using arrow keys and also type in new text, delete old text...
    Once you are done entering the text, hit the Esc key which gets you out of text insert mode.
    Then to save the stuff back out enter
    Code:
    :w
    To exit, type:
    Code:
    :x
    ...

    There is also another editor often built in, which is a little easier to use called nano
    Don't know if it comes pre installed or not, but if not can install using: sudo apt-get install nano

    There are other graphic editors as well, for example I have used geany before likewise gedit.

    Kurt

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

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

    Ok...so now I am using winSCP. I can navigate to the file, open it, and edit it...but when I try to save it I get an error code 3 insufficient permissions... I can't see a way to sudo save the file, and I don't want to screw anything up.

  6. #16

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

    It may depend on which user id you are using to login to the PI and if you enter a password... When I winscp to an RPI, I will log in with userid pi and the password (raspberry), I will often login with the check box that says something like keep me loged in, or the like. Otherwise when you do a save, it will then put up another prompt that asks for password.

    But this depends on things like who is the owner of the files... For example on my Pi, if you do an ls -l you will see:
    Code:
    [email protected] ~/HROS1-Framework/Linux/project/ps3_demo $ ls -l
    total 940
    drwxr-xr-x 2 pi pi   4096 May 20 06:19 action_scripts
    -rwxr-xr-x 1 pi pi 734565 Apr 28 11:14 demo
    -rw-r--r-- 1 pi pi   9194 Apr 21 09:53 main.cpp
    -rw-r--r-- 1 pi pi  78128 Apr 28 11:14 main.o
    -rw-r--r-- 1 pi pi    921 Apr 21 09:53 Makefile
    -rwxr-xr-x 1 pi pi    439 Apr 25 08:22 rc.local
    drwxr-xr-x 2 pi pi   4096 Aug  6 19:49 sixpair
    -rwxr-xr-x 1 pi pi     87 May 20 06:19 start_edison
    -rwxr-xr-x 1 pi pi    107 May 20 06:19 start_rpi
    -rw-r--r-- 1 pi pi  17654 May 20 06:19 StatusCheck.cpp
    -rw-r--r-- 1 pi pi   1607 May 20 06:19 StatusCheck.h
    -rw-r--r-- 1 pi pi  79560 Apr 28 11:14 StatusCheck.o
    So I know that the user pi is the owner of the files. If this is not the case on your robot and you are logging in as user pi,
    you might try changing the file owner using a putty window.

    something like: sudo chown pii *


    I am assuming that the error is on that side and not that your text editor does not have the ability to save the actual files on the PC. By default it saves the files somewhere in your temp directories, example I just ran the editor on my PC to my RPI2 in the HROS1 and the file is saved in: C:\Users\Kurt\AppData\Local\Temp\scp00900\home\pi\ HROS1-Framework-Kurte\Linux\project\ps3_demo

    There are many people up here who are much better at Linux than I am, so if I missed something obvious, hopefully others can give better suggestions.

    Kurt

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

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

    Not sure if this is the problem and definitely not sure what to do about it. :-(

    Code:
    [email protected] ~/HROS1-Framework/Linux/project/ps3_demo $ ls -l
    total 880
    drwxr-xr-x 2 root root   4096 Aug  6 12:57 action_scripts
    -rwxr-xr-x 1 root root 682224 Aug  6 17:29 demo
    -rw-r--r-- 1 root root   9194 Aug  6 12:57 main.cpp
    -rw-r--r-- 1 root root  78220 Aug  6 17:26 main.o
    -rw-r--r-- 1 root root    921 Aug  6 12:57 Makefile
    -rwxr-xr-x 1 root root    439 Aug  6 12:57 rc.local
    drwxr-xr-x 2 root root   4096 Aug  6 12:57 sixpair
    -rwxr-xr-x 1 root root     87 Aug  6 12:57 start_edison
    -rwxr-xr-x 1 root root    107 Aug 13 18:15 start_rpi
    -rw-r--r-- 1 root root  17654 Aug  6 12:57 StatusCheck.cpp
    -rw-r--r-- 1 root root   1607 Aug  6 12:57 StatusCheck.h
    -rw-r--r-- 1 root root  71508 Aug  6 17:26 StatusCheck.o
    [email protected] ~/HROS1-Framework/Linux/project/ps3_demo $

  8. #18
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    97

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

    Ok...thank you all for the help. I got logged in as root, I had to change a few things in order to do that, but then I was able to edit the files no problem using winSCP. Cool little program BTW.

    After restarting it still seamed to hang up, but not nearly as fast. I guess this is progress.

    DB

  9. #19

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

    If it were me, I would probably change the ownership of all of the files to pi (or other user if you created something other than pi).
    Something like:

    Code:
    cd ~
    chown -R pi:pi HROS1-Framework

  10. #20
    Join Date
    Mar 2015
    Location
    Texas
    Posts
    342
    Images
    15
    Rep Power
    34

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

    Quote Originally Posted by darkback2 View Post
    After restarting it still seamed to hang up, but not nearly as fast. I guess this is progress.
    Darn! Sorry that wasn't the fix you are most in need of at the moment. If I were you I'd check my wiring at this point. Also I'd ensure there aren't any other processes running on my Pi consuming needed resources ( with a program like top or htop ).

    Edit: Also you mentioned after restarting. Does that mean you edited the main.cpp file and restarted without running the make command?
    01001001001000000100110001101111011101100110010100 10000001010010011011110110001001101111011101000111 0011

    My Instagram
    My YouTube

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
  •