- Workshop: Programming a Bioloid robot workbench using C# and C++
- Workshop: USB, serial and remote communications with C#
- C++, Bioloid and Raspberry Pi (v0.2)
- So… let’s the Bioloid, C++ and QT games start!
- [UPDATED] A simple but pretty complete Linux C++ example for Bioloid
- Bioloid Workbench Windows C++ examples
[V.02 updates: AX C++ architecture, core classes diagram and HexaWheels scanning video]
Why C++, Bioloid and Raspberry Pi?
C++, specially with the great improvements of the last C++11 standard, joins together a great efficiency in performance and a low memory footprint with advanced high level language features, making C++ a great tool for embedding, robotics, programming.
If you want to know how to use C++ very efficiently these two guides will help you:
– The JSF air vehicle C++ coding standards ( F-35 fighter aircraft)
– ISO C++ committee’s report on performance
– 18 powerful and versatile AX-12 servos
– an ATMega 2561 (CM-510) or, recently, an ARM STM32F103RE 32bits (CM-530), based controller. Also you can control the AX-12 with the USB2Dynamixel straight from your USB with a FTDI driver.
– And a lot of parts to create the structure of the robot
– Broadcom BCM2835 SoC full HD multimedia applications processor
– 700 MHz Low Power ARM1176JZ-F Applications Processor
– Dual Core VideoCore IV® Multimedia Co-Processor
– 256/512 MB SDRAM
One simple example:
C++ is a very powerful but complex programming language, so I think that the better approach is to start step by step, from the most easy features (yes, C++ could be used in an easy way) to the most advanced features it offers. What is C++? I will quote (I try to not explain anything that already is explained), Stroustrup, “his father”, from his book The C++ programming language 3th Edition:
“C++ is a general-purpose programming language with a bias towards systems programming that
– is a better C,
– supports data abstraction,
– supports object-oriented programming, and
– supports generic programming.”
C++ (pronounced “see plus plus”) is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. Developed by Bjarne Stroustrup starting in 1979 at Bell Labs, it adds object oriented features, such as classes, and other enhancements to the C programming language.
- Learn C++, no previous knowledge required
- www.cplusplus.com Tutorials
- MIT Open Courseware introduction to C++
- C++ FAQ
- Google Code University
- C++ Reference
Free books and documents:
- One of the best summarized explanations about C++11
- C++11 new standard, a lot of changes from the previous version of the standard, like:
– Maintain stability and compatibility with C++98 and possibly with C;
– Improve C++ to facilitate systems and library design, rather than to introduce new features useful only to specific applications;
– Increase type safety by providing safer alternatives to earlier unsafe techniques;
– Increase performance and the ability to work directly with hardware
- Programming principles and practices using C++, by Bjarne Stroustrup
- C++ without fear, by Brian Overland, a very easy way to learn C++
In robotics, and embedded programming in general, we will need some advanced knowledge and practices to reach our goals.
Free books and documents:
- Design principles and patterns, by Robert C. Martin, about developing a sound software architecture
- Design Patterns, to develop a depth understanding of Object Orientation and to improve our designs
- Concurrent programming, threading Our robots we will need to do several actions simultaneously, like perceiving the world with several sensors, moving and deciding what to do to reach is objectives.
- Communications, the serial port communications functions are used for wireless and wired connections, and we will need to communicate between controllers and with sensors and servos.
- The C++ Programming Language, by Bjarne Stroustrup, in my opinion the best book to acquire a very depth knowledge about C++ programming. The C++ Programming Language (4th Edition, 2013)
- C++ Concurrency in Action, by Anthony Williams, a wonderful book about the new concurrency classes.
- More books
C++ robotics programming
Well, this is really the goal, robotics programming.
As this is a workshop it will follow the creation of the the walker and vehicle Hexapod showed above in the video. This is currently the core architecture and the HexaWheels module (namespace classes):
And these are the core classes:
The workshop will include:
Like communications with serial port and wireless, using Dynamixels, sensors, … Language features for robotics, like asynchronous communications and threads and… delays!.
Combination of basics features using sensors (like scanning) and servos (walking motions). For example, scanning with a DMS sensor:
As a simple example:
Advanced perception and behaviours
I think this could very funny, using an advanced sensor like Asus Xtion, to detect certain objects to interact, and create configurable and amusing behaviours.
CM-510 mirocontroller programming
PC, Raspberry Pi and Pandaboard, installation and configuration, tool and projects
– GNU C++, Boost
– QT 5
The contents will come soon, very soon…