Page 3 of 10 FirstFirst 1234567 ... LastLast
Results 21 to 30 of 93

Thread: Trying to debug HROS1 with RPI talking to Arbotix Pro

  1. #21

    Re: Trying to debug HROS1 with RPI talking to Arbotix Pro

    Be careful with bootloaders, I think they have a special set-up that they were going to give us beta testers one day. Things change so do promises so we will see I guess. Yea the only Image I have found that works without issue on the pi 2's is the RT image from the NAVIO+ folks. However there is a new Hex spider with the EarlBrain2 which is a raspberrypi 2 on unbuntu snappy with ROS Indigo so....
    Christmas time should be nice. https://www.indiegogo.com/projects/e...one-with-legs/
    Last edited by LloydF; 09-21-2015 at 08:32 PM.

  2. Re: Trying to debug HROS1 with RPI talking to Arbotix Pro

    Quote Originally Posted by tician View Post
    If the Arbotix-Pro is still using the same bootloader as the CM-730, then it is possible to update the firmware over its USB port using the firmware_updater program from the DARwIn-OP framework. It should accept the new firmware binary over the FT232RL-connected UART and reflash itself. If it gets bricked or there is no bootloader, then the ST/Link or SWD dongle would be required.
    The Arbotix-Pro version doesn't use a bootloader and loads at 0x8000000 versus the CM-730 which loads at 0x8003000 (i.e. above the bootloader).

    On a side note, where would one find the CM-730 bootloader program/file other then on a CM-730?

  3. #23
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,182
    Images
    27
    Rep Power
    267

    Re: Trying to debug HROS1 with RPI talking to Arbotix Pro

    I was thinking the CM-730 bootloader was included in the CM-730 firmware archive, but apparently not. I assume it would probably be based on one of the STM32 example bootloaders for re-flashing over a UART, but modified to use the UART connected to the FT232RL (UART3?) instead of UART1 (DXL?).
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  4. #24

    Re: Trying to debug HROS1 with RPI talking to Arbotix Pro

    Ha. I should have realized when GUVCVIEW ran but the UBUNTU Mate Distro works at least as stable as on the edison or so it seems. YEA! It still has some failures as the only sold kernel I have found, has been the PREEMPT-RT kernel. (Looks like erle Brain 2 and NAVIO+ are using it with modifications i.e added raspi-config) This article tells you how to build a RT kernel. https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO
    Last edited by LloydF; 09-25-2015 at 11:58 AM.

  5. #25

    Re: Trying to debug HROS1 with RPI talking to Arbotix Pro

    Right now on the Odroid C1 I am trying out a change which may be helping. At least when I now run the dxl monitor, I can run scan several times and not see errors. Likewise I have been able to change IDs and do something like wr 30 400 and get success.

    What I am doing is before I set the Read timeout, I call: tdcrain() on the file descriptor. If I understand correctly this is semi like calling fflush on a file? That is it should not return until all of the characters have been output. I created a new virtual function in the CM730 class, which I then implemented in the LinuxCM730 class.

    I uploaded the changes to my fork (kurte) on github in the branch Use-my-joystick-controller. Warning unfortionatly on some of these files it shows the complete file changed even though I really only maybe added one maybe a few lines. More on this in a different posting.

    Edit: I have noticed that on at least one of the times I did the wr 30 400 to a servo, there appeared like there was a rather long delay between when I hit the cr and the servo moved. So still looking at maybe how it is buffering. If there is some form of timeout?

    Kurt
    Last edited by KurtEck; 09-24-2015 at 11:19 AM.

  6. #26

    Re: Trying to debug HROS1 with RPI talking to Arbotix Pro

    Tried a few more tests with the updates, plus I re-added back in the ioctl calls for TIOCGSERIAL/TIOCSSERIAL that the code base had, that was disabled for USB2AX type code.

    I also tried adding on the ASYNC_LOW_LATENCY flag to see if that might help. I was pretty sure that was a longer shot as I think my machine was already setup for low latency... I think the default for FTDI is 16 and mine is already set to 1

    Code:
    odroid@odroid:~$ cat /sys/bus/usb-serial/devices/ttyUSB0/latency_timer
    1
    I found information about some of this up on the site: http://projectgus.com/2011/10/notes-...-with-arduino/

    Again with these changes I am not getting errors with the dxl monitor program. It would be interesting to see what the values are on an RPI2... Also should try out these changes with the actual robot doing something.

  7. #27

    Re: Trying to debug HROS1 with RPI talking to Arbotix Pro

    Update to 2nd note above - Don't think adding the ASYNC_LOW_LATENCY flag will make any difference now on RPI2. I booted up my RPI2 and plugged a FTDI device in it and it too showed the latency of 1... Also found on web where Linux was updated awhile ago and now sets the ASYNC_LOW_LATENCY flag by default.

    Have also started to do some testing of the ps3_demo program. At first I was getting nowhere, I would try to run: ./demo
    and the program would simply exit doing nothing and with no error messages at all. I sprinkled in some printf messages to localize where the issue is: It is in LinuxMotionTimer::Start().

    The pthread_create fails with error code 1 (which then just exit(-1) ).
    The issue is that the thread code here is trying to change the scheduler (SCHED_RR) and set the tread priority to 31, which is not allowed for non-privileged user. Earlier I updated joystick code to not require sudo, but now it looks like this code requires it.

    I am not sure if one can setup to use different scheduler priorities without sudo? I saw some stuff on a NICE value. Also not sure how much this helps out the motion manager...

    For the fun of it I may hack this function, that if fails to create the thread, it print out a message and then start the thread with default stuff and see if it works OK.

  8. #28
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,182
    Images
    27
    Rep Power
    267

    Re: Trying to debug HROS1 with RPI talking to Arbotix Pro

    To enable higher priority without sudo, you have to modify "/etc/security/limits.conf" by adding:
    Code:
    @darwin    hard    rtprio    unlimited
    @darwin    soft    rtprio    32
    
    @darwin    hard    nice     0
    @darwin    soft    nice     0
    where darwin was the default user for the theatre students to keep them from messing with the system. Change to meet your needs.

    It is only the motion manager that uses the real-time callback thread of the motion timer, so making sure that works well will keep everything else working well.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  9. #29

    Re: Trying to debug HROS1 with RPI talking to Arbotix Pro

    Thanks tician!

    Yep that got it up and working without sudo. In this case substituted odroid for darwin and then reboot...


    I may still put in the code to give some form of error message and maybe try to recover without RT priority.

  10. #30

    Re: Trying to debug HROS1 with RPI talking to Arbotix Pro

    I tried out The new Raspberian release (JESSIE). Same Latency issues as all the non-RT kernels.

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, 04:40 AM
  2. HROS1 RPi and ArbotixPro communication
    By az139 in forum Arbotix, Microcontrollers, Arduino
    Replies: 6
    Last Post: 08-24-2015, 02:03 AM
  3. HROS1 - Wifi stopped working?
    By KurtEck in forum Humanoids, Walkers & Crawlers
    Replies: 8
    Last Post: 05-20-2015, 10:54 AM
  4. Question(s) where in the Arbotix AVR code is it talking to the XBEE serial port?
    By stephen.hazel in forum Arbotix, Microcontrollers, Arduino
    Replies: 5
    Last Post: 05-04-2012, 01:21 PM
  5. Project R2Talk2 - a talking robot with rotating head
    By Macro Man in forum Project Showcase
    Replies: 16
    Last Post: 09-13-2009, 07:45 AM

Posting Permissions

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