control vex directly with pc c++ program


I want to buy a vex robot.
I want to make A program in c++ that will be connected to the robot and to cameras
the program will decide when to move and where.
I am wondering what is the best why to do this
which vax robot IQ / EDR
what technology robotC easyC something else maybe ?
I figure the best way is connect vex to pc via usb
can you help a me ?


If you want the camera ON THE ROBOT:

C++ isn’t going to happen on VEX, best I can do is a C program on the robot and some kind of C++ program on either another co-processor or on a PC running a UART link to the robot.

All a royal PITA using Vex, VexNET and ROBOTC. Because none of those technologies were meant to run much longer than 3 minutes. To be clear, they can, but that’s not their intended use case.

I would use Arduino/Intel Edison/Raspberry Pi/Beaglebone Black as the brain for this robot, use XBee as the antenna (for control, not for video, not even close to enough bandwidth) and something like this as the sensor/motor hub.

You’ll want one of these (or something like it) to power the electronics from the battery.

You can go with VEX batteries, or not. Same goes for the motors, but anything not driven by PWM will need it’s own motor controller.

If you care about being able to see the video, that could be an issue unless the robot lives in an area covered by WiFi, if it does, then why not control it over WiFi?

If you want the robot to rove around being looked over by cameras:

The best bet is some kind of program running off the robot communicating to everything over Wifi probably.

Lots of options, best of luck.

PROS supports it

Extensive use of C++ is definitely possible on the VEX Cortex. I’ve successfully used advanced features of C++ like polymorphism, pure virtual functions, and even basic STL containers. You will need to use PROS or ConVex though.

Cody have said a disturbing thing.

“All a royal PITA using Vex, VexNET and ROBOTC. Because none of those technologies were meant to run much longer than 3 minutes. To be clear, they can, but that’s not their intended use case.”

Will it work only for 3 minutes is there a reason why it won’t work longer ?software, hardware ?

Are there any kits like vex for robotics with other ‘brains’ ?

I didn’t say that it wouldn’t work longer, I said they were designed to work that long. I’ve never tried to run a robot much longer than an hour.

Also, I’m fairly sure C++ isn’t implemented in ConVEX, I’ve talked to James about this, unless somethings changed. PROS might have it but last I checked a few key operators like new and delete were missing and I was warned that the whole thing are extremely experimental. I’ll ask Javid.

I don’t want to derail this thread from the original topic but I think it’s important that people understand where C++ falls within the ConVEX/PROS environments. Most of my experience is with ConVEX but everything I say should apply to both environments because both use standard C compilers.

Using C++ with Vex is different than using C++ in a desktop environment but most of the same language features can be used. Exceptions and run time type identification (RTTI) are the two main language features that need to be disabled. The operators new and delete need to be defined to use the operating system’s equivalent (chHeapAlloc with ConVEX). This forces the C++ standard library (including containers like std::vector) to use the thread safe heap allocators and allows the user to use the new operator. There are some other functions that need to be defined as stubs to prevent compiler errors.

Using C++ in these environments isn’t a question of implementation. Except for a few makefile modifications and the stuff I mentioned above, there is nothing to implement. The GCC compiler supports compiling C++ and C files together with no issue. The standard library comes bundled with the toolchain so using containers like std::vector, std::array, and std::function is possible by just including a header file.

There are a few other caveats that I haven’t mentioned here but like I’ve said, using C++ with PROS/ConVEX is easily possible.

OK thanks for clearing that up. I was aware that GCC could compile the code, just wasn’t sure what pieces were left out by the environments as I’ve never worked with these RTOS’s before.

will PROS/ConVEX work also on other robots ?

I want to make a prototype and the Vex kit is wonderfall for newbie like me.
I am wondering if I will be able to replace the brain later on and stay with the body motors battery and all ?

or I can start with something more robust ?

Wonder if I did anything wrong in my program, but last time when I was doing my motor free speed mapping in ROBOTC, debug stream stops refreshing after about 15 minutes. But the values are still being updated – you just have to stop the program and then all updated values just magically pop up… So I would agree that ROBOTC is not designed for hours of testing and data printing.

And it would be nice if someone can explain to me why.