Get vehicles coordinates - sumo

I am using SUMO traffic simulation source code (in windows and Visual Studio) loading the UI and running a scenario.
I need to get all the vehicles coordinates at a certain frequency.
I am looking for a method, in the source code that "moves the vehicles", that I can get the locations?
I know that if I right click in the UI on a vehicle, I can copy it's Geo position of the cursor and set a break point in: GUIGLObjectPopupMenu::onCmdCopyCursorGeoPosition
and get the coordinates, but I am looking for something frequent and constant.

You are probably looking for --fcd-output, see https://sumo.dlr.de/wiki/Simulation/Output/FCDOutput
If you need it online use TraCI or libsumo with the vehicle.getPosition function, see https://sumo.dlr.de/wiki/TraCI/Vehicle_Value_Retrieval

Related

RedisInsight: Configuring graph visual display/results?

Is there a way to configure the display of RedisGraph results in RedisInsight.
May be an option to edit the CSS directly is good too.
The reasons :
The color of the nodes is awful
The font-size is too small
nice to be able to change color of nodes with property value X
it will be good to be able to specify the default-property that will be displayed instead of node ID. Also on mouse-over too. (i know i can changed but it becomes tedious to do it for every result).
same for relationships
ERR: If some of the nodes in the result does not have the property you want to switch to (for display), then the 'switch' does not work i.e. all nodes still display IDs
for my screen it just happen that the +/- zoom is hidden i.e. I have to scroll back and forth. It will be good if we can use the keyboard to zoomin/zoomout
once you select something you have to click outside of the graph area to be able to scroll, supper annoying
command history on the query editor would be nice
ability to pin the result-area so that the new result does not spawn yet another area .. it is nice to have the option for multiple result-areas, but the normal interaction is refining queries rather than writing new query every time. (tabs would have been better)
if possible select-area to zoom will be nice. (by holding mouse down and selecting area )
!! double-click outside a node, may Zoom, instead of doing nothing
!! local zoom/search : typing in search-bar (there is space for it after +/-) to zoomin on the node with that have property and/or value f.e. val:3 , word:test , ...
Posting this here because couldn't find a place to give feedback on RedisInsight !

Get display coordinates of tab using chromedriver and selenium

I am looking to find the co-ordinates to a specific tab in a chromedriver instance controlled by selenium.
The scenario is as follows: I have a chromedriver instance automated with selenium that contains multiple tabs. I am looking to pin specific tabs (not all of them) and in order to do that, I am using autoit to send the necessary mouse and keyboard commands to pin the actual tab. However, in order to do that, I need to know the screen/display coordinates of the tab (so I can send the mouse there).
The chromedriver has the coordinates to the actual browser, however I have been unable to find any reference to the coordinates of the tab.
Does anyone know how I could go about getting the coordinates of a specific tab?
Update: I am using c#
It would be a big help if you let me know what language you are coding the tests in, however this can be achieved through checking the position of your scrollbar as the AI does not have a monitor to be limited to a resolution, essentially it can see the whole of the web-page no matter what.
Below is a link to some of the usage for checking and comparing the scrolled status, even if this isn't a direct solution i'm positive it will point you in the right direction. (This is something i had to do not very long ago)
http://www.software-testing-tutorials-automation.com/2015/02/how-to-verify-scroll-present-on-browser.html
If you have any queries let me know,
All the best, Jack

Autohotkey works different on different workstations

I wrote a script using autohotkey, which has to execute a few clicks inside a window. Mostly, I used the ControlClick function to do the job, and it works well. I had to click a chechbox, and for that I used the MouseClick function.
I used relative coordinates for the functions (relative meaning x and y starting from the top left corner of the current active window).
If I run the script on my PC, it activates the window I want it to correctly and does what I programmed it to, but when I compile an executable and run it on a different workstation (I change only the workstation, not the programs in use, not even the operating system), it just doesn't work, I have the feeling it confuses x coordinates with y coordinates, the sleep function doesn't work anymore...
My actual question would be how can I make sure the script runs the same in any conditions? How can I make sure I select the right window, can't I select it using something different than it's title? Maybe a class, or something more specific?
Thanks a lot :D !
It was woking differently because the screen resolutions were not the same, so if I clicked at x100 y100 on 1280x1024, it was not the same as x100 y100 on 1920x1080 (relative coordinates), so I had to scale the coordinates, and after doing this, it worked.
If one has same problem as I did, I hope this will be useful :D .

What is the most efficient way to quickly understand how a complex LabView VI works?

What is the best way to understand a complex LabView VI that controls a motor?
My goal is to control the motor from a joystick.
The wiring diagram shown below allows a LabView user to control the motor from the LabView GUI: move a slider up and down either increasing or decreasing the desired velocity. As the slider's value changes, it is fed into a bunch of math controls and eventually gets converted into a command string for the motor to interpret. This command string, if I understand correctly, is bunch of bytes that get written to the serial port.
Instead of using the LabView GUI to control the motor, I would like to use the joystick.
What is the best way to approach this?
The joystick has pitch,yaw,roll,and throttle. Which one relates best to the velocity of a motor?
The answer to your title "What is the most efficient way to quickly understand how a complex LabView VI works?" is probably to do some combination of the following:
Look at the VI's inputs and outputs to try and understand what they are there for. The label and caption of controls and indicators may be helpful, also right-click to check the description and tip.
As well as controls and indicators, look for other I/O: queues, notifiers, global variables, file read/writes, instrument communications, and for any data storage that persists between calls such as an uninitialised shift register.
Look at the overall structure of the VI to see how it executes, e.g. is it a one-off operation, does it execute different cases depending on some input, does it loop until a certain condition happens, does it use a state machine structure, etc
Break down the VI's structure into smaller pieces that you can understand. You could print the diagram out and annotate it by hand, or add frame decorations and text comments to the diagram to record what you deduce. If the diagram is cluttered or poorly laid out, rearrange it as you go along (use Ctrl-click and drag on the diagram background to add blank space where you need it).
Set probes on key wires and watch them while the VI runs to see what happens
If possible, manually set the VI's controls to example values and run it to see what happens (this may not work if the VI depends on other parts of a program running at the same time)
Write a test wrapper VI that calls the complex VI and supplies it with example data or inputs to see what happens.
To address your specific question about the VI diagram you've posted, I can see various controls for quantities such as Velocity, Position, Amplitude, Max A (amplitude?), Frequency and so on. You need to decide which of these quantities should be controlled by which axis or output of your joystick. Then you need to add code that reads those values from your joystick, and modify the existing code so that the parameters you want to control are supplied by the joystick values instead of the front panel controls. You could probably just put the joystick reading code inside the existing loop, wire the joystick outputs to join up with the wires from the front panel controls you want to replace, and then change the relevant front panel controls to indicators from the right-click menu so that they will show the values you are getting from the joystick.
The best way is to write one from scratch. But you could analyse the code by clicking the Highlight Execution button to display an animation of the block diagram execution when you run the VI, and use probes to check intermediate values. And you probably should also do an on-line course, e.g. LabVIEW Training: Learn LabVIEW in Three or Six Hours
My answer to your third question is "throttle.".

LINQPad: Anyway to make the Dump() results be initially collapsed?

Couldn't find it anywhere (google or stackoverflow).
Is there a way to force Dump()'s output to be automatically collapsed?
Update:
Some more info, to bring more focus to the question.
As mentioned below Collapsing can be done after the output as rendered via keyboard shortcust (Alt+1, Alt+2, Alt+3)
And can rendering depth can be determined by passing an int depth param, but that does not allow to expand the results.
Is there some way to change the CSS formatting? I'm not that fluent in CSS, so this might be the solution.
Why I need this:
What I want is to make the output 'cleaner', and dive in when something of interest show's up.
I'm running a query repeatedly, and don't need all of the output all the time, but still using my human abilities to detect change, instead of coding the detection.
Update: November 2013
As Joe (the author himself!) mentions in the comments, LINQPad no longer has the limitation described.
It is now possible to state 0 and collapse the information after it's rendered.
No, although you can call Dump with a number to force it to display to that nesting depth:
.Dump(0)
You can also use the formatting shortcuts (Alt+1, Alt+2, Alt+3) to collapse the whole display to one, two or three levels.
Another option is to dump to grids. Call Dump(true) or use the toolbar button. Grids show only one level and subsequent levels are shown upon demand with hyperlinks.