robot

Android Camera - app passed NULL surface

僤鯓⒐⒋嵵緔 提交于 2019-12-10 01:14:33
问题 Whenever I run the cam_thread I get the error "app passed NULL surface". This code supposedly works on the HTC Incredible 1. I've reconfigured it slightly to run on a droid x. However I still get this error. public class Android_Activity extends Activity { Main_thread simulator; ToggleButton togglebutton; EditText ip_text; SensorManager sm = null; SurfaceView view; Sensors_thread the_sensors=null; String IP_address; Android_Activity the_app; @Override protected void onCreate(Bundle

FEST: Wait for the GUI to load before doing anything

不打扰是莪最后的温柔 提交于 2019-12-08 02:48:12
问题 @Before public void setUp() { Robot robot = BasicRobot.robotWithCurrentAwtHierarchy(); ApplicationLauncher.application("myApp").start(); Pause.pause(5, TimeUnit.SECONDS); frame = WindowFinder.findFrame("frame0").using(robot); JTableFixture table = frame.table(new GenericTypeMatcher<JTable>(JTable.class) { @Override protected boolean isMatching(JTable table) { return (table instanceof myTreeTable); } }); } This code works well. If we remove the 5 seconds pause, then the table is not found

Color Filter Technique OpenCV

谁都会走 提交于 2019-12-06 13:47:14
I am reading a picture and filtering out the colors and this is the result I get in the following images. The code is from the example folder in the opencv module. I am trying to feed the picture back to an A.R Drone 2.0 and have the drone follow the color white. How would I do the second part? var cv = require('C:/users/danny/codes/node_modules/opencv/lib/opencv'); // (B)lue, (G)reen, (R)ed var lower_threshold = [220, 220, 220]; var upper_threshold = [255, 255, 255]; //var lower_threshold = [46, 57, 83]; //var upper_threshold = [80, 96, 115]; cv.readImage('C:/users/danny/codes/node_modules

FEST: Wait for the GUI to load before doing anything

一曲冷凌霜 提交于 2019-12-06 13:25:01
@Before public void setUp() { Robot robot = BasicRobot.robotWithCurrentAwtHierarchy(); ApplicationLauncher.application("myApp").start(); Pause.pause(5, TimeUnit.SECONDS); frame = WindowFinder.findFrame("frame0").using(robot); JTableFixture table = frame.table(new GenericTypeMatcher<JTable>(JTable.class) { @Override protected boolean isMatching(JTable table) { return (table instanceof myTreeTable); } }); } This code works well. If we remove the 5 seconds pause, then the table is not found because it takes some seconds to the app to load it. I would like to know if there is a cleaner way of

Pepper Robot: How to port Python landmark detection to Choregraphe?

僤鯓⒐⒋嵵緔 提交于 2019-12-06 12:14:50
问题 I'm trying to write a small programm to have Pepper check for landmarks inside a room through Choregraphe. The regular Python code for landmark detection works just fine, but i can't port it to Choregraphe.http://doc.aldebaran.com/2-5/dev/python/examples/vision/landmark.html I could already import the simple Python File in Choregraphe according to this video, but there's always an error when doing it with the landmark detection. https://www.youtube.com/watch?v=orDWxHQxw5s This code gives this

How to restrict access to files in a folder in codeigniter

六眼飞鱼酱① 提交于 2019-12-06 05:07:48
问题 Hello I have used codeigniter to develop my website but when my website is searched in google , google shows up links to the files (pdf) in a particular folder and user can view these files (pdf) directly without login. I want to restrict google to directly show the links to these files. ex: www.mywebsite/myfolder/myfile Please guide me how can I accomplish this. Thank you. 回答1: A little modification from the previous answer : Place the .htaccess in your file folder with the content order

Googlebots Ignoring robots.txt? [closed]

点点圈 提交于 2019-12-05 03:19:08
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I have a site with the following robots.txt in the root: User-agent: * Disabled: / User-agent: Googlebot Disabled: / User-agent: Googlebot-Image Disallow: / And pages within this site are getting scanned by Googlebots all day long. Is there something wrong with my file or with Google? It should be Disallow: , not Disabled: . Maybe give the Google robots.txt checker a try Google have an analysis tool for checking

Android Camera - app passed NULL surface

会有一股神秘感。 提交于 2019-12-05 00:33:10
Whenever I run the cam_thread I get the error "app passed NULL surface". This code supposedly works on the HTC Incredible 1. I've reconfigured it slightly to run on a droid x. However I still get this error. public class Android_Activity extends Activity { Main_thread simulator; ToggleButton togglebutton; EditText ip_text; SensorManager sm = null; SurfaceView view; Sensors_thread the_sensors=null; String IP_address; Android_Activity the_app; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); view = new SurfaceView

Precedence of X-Robots-Tag header vs robots meta tag

做~自己de王妃 提交于 2019-12-04 17:50:59
问题 I've placed the following Header in my vhost config: Header set X-Robots-Tag "noindex, nofollow" The goal here is to just disable search engines from indexing my testing environment. The site is Wordpress and there is a plugin installed to manage per-page the meta robots settings. For example: <meta name="robots" content="index, follow" /> So my question is, which directive will take precedence over the other since both are being set on every page? 回答1: I am not sure if a definitive answer

Java serial port write/send ASCII data

牧云@^-^@ 提交于 2019-12-04 15:36:30
My problem is that I need to control mobile robot E-puck via Bluetooth in Java, by sending it commands like "D,100,100" to set speed, "E" to get speed, and etc. I have some code: String command = "D,100,100"; OutputStream mOutputToPort = serialPort.getOutputStream(); mOutputToPort.write(command.getBytes()); So with this method write I can only send byte[] data, but my robot won't understand that. For example previously I have been using this commands on Matlab like that: s = serial('COM45'); fopen(s); fprintf(s,'D,100,100','async'); Or on program Putty type only: D,100,100 `enter` Additional