Why C++, Bioloid and Raspberry Pi?
[caption id="attachment_1254" align="alignleft" width="150"] C++ Stroustrup's book[/caption]
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
.
.
[caption id="attachment_1221" align="alignleft" width="300"] Bioloid Premium[/caption]
Bioloid Premium is a wonderful kit for creating legged and wheeled robots, including (here full parts list):
- 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
.
[caption id="attachment_1257" align="alignleft" width="216"] RaspberryPi[/caption]
Raspberry Pi is the cheaper and more brilliant conceived SBC (more specifications here):
- 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:
[youtube http://www.youtube.com/watch?v=Yhv43H5Omfc&w=480&h=360]
Learning C++
Starting:
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."
And wikipedia:
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.[3] 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.
Web resources:
- Learn C++, no previous knowledge required
- www.cplusplus.com Tutorials
- MIT Open Courseware introduction to C++
- C++ FAQ
- Google Code University
- C++ Reference
If you want more C++ links, these found at JUCE will help you.
[caption id="attachment_1385" align="alignright" width="140"] Programming -- Principles and Practice Using C++[/caption]
Free books and documents:
- Thinking C++, download Vol1 and Vol2
- 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
Books:
- Programming principles and practices using C++, by Bjarne Stroustrup
- C++ without fear, by Brian Overland, a very easy way to learn C++
Advancing:
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.
Books:
- 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):
[caption id="attachment_1391" align="aligncenter" width="300"] AX C++ architecture v2[/caption]
And these are the core classes:
The workshop will include:
- Basics
Like communications with serial port and wireless, using Dynamixels, sensors, ... Language features for robotics, like asynchronous communications and threads and... delays!.
- Intermediate
Combination of basics features using sensors (like scanning) and servos (walking motions). For example, scanning with a DMS sensor:
As a simple example:
[youtube http://www.youtube.com/watch?v=UHKaYuaZi4A&w=480&h=360]
- Advanced
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
- Tools:
PC, Raspberry Pi and Pandaboard, installation and configuration, tool and projects
- GNU C++, Boost
- Eclipse
- QT 5
The contents will come soon, very soon...
No hay comentarios:
Publicar un comentario