PDA

View Full Version : Conflict between rme and ps3_demo in using the CM 730



guoshihui
10-20-2015, 12:34 AM
So when playing with the demos of the ps3, I found that sometimes the program *start_rpi* failed to start and saying *CM 730 is in use*.

I guess it is because I ran the motion editor (rme) before running the ps3 demo, so I restarted the RPI, then ps3 demo works. Is my guess right? Any easier way to make it work without restarting the PC?

Shihui

KurtEck
10-20-2015, 08:51 AM
I believe the problem is with the communications between the Raspberry PI and the Arbotix Pro (logical CM 730).

I have written some about it up on the thread: http://forums.trossenrobotics.com/showthread.php?7617-Trying-to-debug-HROS1-with-RPI-talking-to-Arbotix-Pro

I submitted a pull request that for me helps out out a lot. I know that Andrew checked in some changes to the HROS1_Framework project last week, but I don't believe that this pull request has been taken in. (My quick check up github does not show at least one of the three files I changed having changed for 4 months...).

I did my pull request from a branch I created for it, so it is easy to pick up my changes...
https://github.com/KurtE/HROS1-Framework/tree/master-FTDI-Try-rcdrain


Kurt

sonel
10-27-2015, 03:49 AM
Shihui, did you by any chance leave the rme in an "ungraceful" way (i.e. Ctrl-C or after a crash)? There are some cleanup calls when finishing execution of rme (actually of all programs that connect to ArbotixPro) which would not be executed in case of such an sudden finish.

Alex.

Mike.
11-14-2015, 06:31 PM
Hi all,
Well I dusted off the HROS1 I built last spring and decided to try to get the PS3demo to work. I am using the Edison. Here is what i have done:

git pull
from the "HROS1-Framework/Linux/project" directory: make clean && make all
followed the directions on here: https://github.com/Interbotix/HROS1-Framework/wiki/Troubleshooting
This seemed to work successfully, I recieved what looked like address.
then from the "HROS1-Framework/Linux/project/ps3_demo" directory: make clean && make all

I followed the instructions listed here: https://github.com/Interbotix/HROS1-Framework/wiki/ps3_demo
But now I am stuck here after I run "./start_edison":

killall: demo: no process killed

Fail to open port
CM-730 is used by another program or do not have root privileges.


Fail to open port
CM-730 is used by another program or do not have root privileges.

Fail to initialize Motion Manager!
./start_edison: line 7: bluetoothd: command not found

Any suggestions?

Mike.

KurtEck
11-15-2015, 05:56 PM
Sorry, I have not started up the system in awhile with the Edison as I currently am using an Odroid, hopefully someone using Edison and/or Trossen can respond. With RPI2 and Odroid C1, I have received this type of message CM-730... this is due to issues with how the processors talk to the Arbotix Pro. In particular calls that try to query data back from the Arbotix Pro time out. I was able to improve this on my system, by having the system wait until the data is transmitted to the Arbotix Pro (flush), before starting the receive time out. I have an outstanding pull request to get this into the main code base...

You can find out more information in the system by turning on debug information:
Example in: .../linux/build/LinuxCM730.cpp in the method: LinuxCM730::LinuxCM730, change: DEBUG_PRINT = true;

Likewise: .../framework/src/CM730.cpp likewise in the constructor turn DEBUG_PRINT = true

As for if the PS3 stuff will work, it may depend on which image you are using. If you are using the earlier image than the start_edison was the right thing. If you are using another image, (at times I have not had luck), but I believe others have created a different startup script. But again I have not done anything with Edison for awhile.

good Luck

Mike.
11-15-2015, 06:52 PM
Kurt, thanks for the reply. I played with it a little bit more tonight and got it fully working. Here is what I did in case others find this thread useful.

I had two errors:

Fail to open port
CM-730 is used by another program or do not have root privileges.
This is posted when the Edison cannot communicate with the CM-730. This was due to the 90 degree adpater. To pair the PS3 controller the instructions have you disconnect the CM-730 and use that USB port to pair the PS3 controller with the Edison using sixpair. Apparently, when I reversed the processes to plug the CM-730 back into the Edison, it did not make good contact. Unpluging the 90 degree adapter and plugging it back in allowed the two to communicate again and got me past the error message.

./start_edison: line 7: bluetoothd: command not found:
The second error message seems due to Bluez4 not being installed on my image. This has been documented already in these forums, thanks to all who worked through these growing pains. Since I had Bluez5 installed I simply followed R3n33 instructions and created a batch file to start the PS3_demo. Thanks much to R3n33! Here is a link to her post:
http://forums.trossenrobotics.com/showthread.php?7648-Edison-PS2-Controller-Bluetooth-Issues

So, now he walks. Yea! Well, more like attempts to stomp invisible grapes, but hey one step at a time... (too punny). Forward, left, and right all seem to work fine. Backwards always results in a faceplant. I didn't have the battery installed, so perhaps that will help. I see that R3n33 has created a nice gate, and I may try that out just for fun.

Something to note, stopping the PS3_demo does not kill the servos; they remain active. To kill them I need to go into DXL_monitor, then exit, then execute RME, type off, then exit. If I don't run DXL_monitor first, RME will cannot see the servos.

Thanks all!

LloydF
01-10-2016, 02:40 PM
If the Distro you are using has a Desktop. Shut it off in raspi-config and set it to a boot with log in and you should be good to go. If ya need the desk top gui then just fun startx and reboot when you are finished tinkering.:wink: