Closed wisechengyi closed 7 years ago
Hi wisechengyi, thank you for raising an issue. I appreciate it- I don't personally have a mac (that's what you're running on, right?) so it helps me a ton to debug possibly platform specific issues.
I have some questions: 1) When you "Scan for Robots", are there multiple ports? Have you tried the others?
2) Could you try the firmware inside of the following zip? That's the last confirmed firmware to work on UCS that I've personally tested on my machine. https://github.com/uArm-Developer/UArmForArduino/archive/2.0.zip On an aside, you should know that currently there are two versions of firmware floating around as uFactory migrates soley to this new communication protocol. Sorry for the confusion!
3) Have you encountered any other issues on Mac? I'm particularly curious about computer vision- have you plugged in a camera and tracked an object using the vision system?
Cheers, Alex Thiel
1) there were 2 options: usbserial and bluetooth, so no doubt it had to be usbserial.
2) will try that and let you know
3) the opencv is package is a bit tricky to install, but essentially I did:
brew install python3
brew install opencv3 --with-python3
then have to manually find where the cv2.cpython-35m-darwin.so
for python3 (cv2.so
for python2.7, doesn't apply here but just for reference), hence I am tweaking PYTHONPATH
in order to launch the main gui:
PYTHONPATH=/opt/twitter/Cellar/opencv3/3.1.0_4/lib/python3.5/site-packages:$PYTHONPATH python3 MainGUI.py
Will try the tracking part.
With regards to 3), I think you'll run into a problem when you try to track an object using vision, if you don't compile OpenCV from scratch. That's because the latest release of OpenCV has a bug in it. Instead, you need to compile the dev version straight from https://github.com/opencv/opencv, in order to guarantee that bug is gone. I'm hoping OpenCV fixes this soon.
It hangs when I do Add Event -> Recognized -> Face Detected
Robot Robot not avaliable, canceling servo change
GUI Event Type <class 'EventsGUI.RecognizeCascadeEvent'>selected
2016-11-03 22:25:44.114 python3[67375:2032213] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
Traceback (most recent call last):
File "/Users/yic/workspace/uArmCreatorStudio/ControlPanelGUI.py", line 358, in promptUser
self.addEvent(eventPrompt.chosenEvent, parameters=eventPrompt.chosenParameters)
File "/Users/yic/workspace/uArmCreatorStudio/ControlPanelGUI.py", line 386, in addEvent
eventWidget = newEvent.dressWidget(blankWidget)
File "/Users/yic/workspace/uArmCreatorStudio/EventsGUI.py", line 418, in dressWidget
+ self.parameters["objectID"] + QtCore.QCoreApplication.translate("EventsGUI", "' Recognized")
TypeError: bad operand type for unary +: 'str'
which doesn't look like a opencv issue.
If this is not the right way to do tracking. Could you clarify how to do so or link some doc?
also newbie question. https://github.com/uArm-Developer/UArmForArduino/archive/2.0.zip doesn't appear to contain firmware.hex
, or should I try to compile it?
ok I was able to use https://github.com/uArm-Developer/uArmCreatorStudio/tree/master/Robot_Firmware/FlashFirmware to get it connected to the studio.
from the look of it, their fork starts to divert now. Which one should I stick to?
It's pretty lit!
Turns out the Qt exception I saw was because of a sloppy language translation job from their fork. I reset to your master and it works great now!
Thanks a lot! -Yi
Hi Yi, I'm glad the tracking is working for you! I'm a bit surprised, since I usually have to compile the latest openCV version for it to work. I suppose we'll find out when you make a Vision object and try to track it.
As for the firmware- you have to upload it to your robot through the arduino IDE. If you download the release for windows (https://github.com/apockill/uArmCreatorStudio/releases/download/v1.1-beta/uArm.Creator.Studio.zip) there is a ReadMe that explains exactly how to do that. It's pretty simple, but it goes over each step.
I'm hoping you'll be connected and running in no time.
it is rolling pretty well now. thanks! lastly I was wondering if you have any camera recommendation for these purposes as posted on https://forum.ufactory.cc/t/camera-recommendation/440, feel free to reply there so other folks will benefit as well.
Glad to hear it's working, Yi! Please keep in touch and send any cool projects you might make with UCS.
I'll post on that thread- I definitely can help with choosing cameras :)
Resources/Objects/TrackableObject Robot Marker/
OpenCV Error: Assertion failed (The data should normally be NULL!) in allocate, file /tmp/opencv320161102-17299-15gmmk8/opencv-3.1.0/modules/python/src2/cv2.cpp, line 163
Traceback (most recent call last):
File "/Users/yic/workspace/uArmCreatorStudio/CalibrationsGUI.py", line 697, in objectSelected
self.vision.addTarget(self.newRobotMrkr)
File "/Users/yic/workspace/uArmCreatorStudio/Logic/Vision.py", line 103, in addTarget
self.planeTracker.addView(view)
File "/Users/yic/workspace/uArmCreatorStudio/Logic/Vision.py", line 544, in addView
self.matcher.add([descrs])
cv2.error: /tmp/opencv320161102-17299-15gmmk8/opencv-3.1.0/modules/python/src2/cv2.cpp:163: error: (-215) The data should normally be NULL! in function allocate
@apockill is this the error you were referring to? I encountered it at step 4 of robot/camera calibration.
This happens when you compile OpenCV3.1 and not OpenCv 3.1-dev
It's currently a known issue with OpenCV, so you have to compile the dev version to get the patch.
On Sun, Nov 20, 2016, 7:51 PM Yi Cheng notifications@github.com wrote:
@apockill https://github.com/apockill ```ObjectManager Deleting Robot Marker permanently Resources/Objects/TrackableObject Robot Marker/ OpenCV Error: Assertion failed (The data should normally be NULL!) in allocate, file /tmp/opencv320161102-17299-15gmmk8/opencv-3.1.0/modules/python/src2/cv2.cpp, line 163
Traceback (most recent call last):
File "/Users/yic/workspace/uArmCreatorStudio/CalibrationsGUI.py", line 697, in objectSelected self.vision.addTarget(self.newRobotMrkr) File "/Users/yic/workspace/uArmCreatorStudio/Logic/Vision.py", line 103, in addTarget self.planeTracker.addView(view) File "/Users/yic/workspace/uArmCreatorStudio/Logic/Vision.py", line 544, in addView self.matcher.add([descrs]) cv2.error: /tmp/opencv320161102-17299-15gmmk8/opencv-3.1.0/modules/python/src2/cv2.cpp:163: error: (-215) The data should normally be NULL! in function allocate
I encountered it at step 4 of robot/camera calibration.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/apockill/uArmCreatorStudio/issues/13#issuecomment-261830395, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqOfMZLCZKpDERam0bO2NPwch55cltEks5rAQcigaJpZM4KoCVA .
thanks!
The firmware is 1.7.4. It let me select the usb port, and uarm started moving a bit, but after a few seconds the exception popped out. Not sure how I can proceed there.