top of page

Forum Posts

este este
Jun 04, 2024
In Software
I am interested in creating a gait that rotates the Bittle robot in place. If anyone has tried this, can you share your experience and the gait that you developed? Update (June 20, 2024): I have been trying to use the below recommended skills kvtL and kvtR but I don't find them satisfactory as a gait to rotate in place. Both of these skills push Bittle backwards with the kvtR being worse in that regard. They also have a rocking motion though that may be hard to avoid. See videos posted below. Note that I am using the rubber "socks" that came with Bittle because the floor is very smooth and rather slippery. I know this is a complex problem and dependent on many factors including proper joint calibration (which I believe is fine) and the presence or absence of the rubber socks (which I want to keep on). Does anyone have recommendations on tools that can help create new gaits or to tune existing gaits, either "in the real world" or in simulation? kvtL kvtR Bittle_kvtL.mp4 Bittle_kvtR.mp4
Has anyone tried to create a "rotate in place" gait for Bittle? content media
0
7
55
este este
May 21, 2024
In Software
Do you have a Bittle robot with the BiBoard?  Is so, are you interested in knowing more about how the OpenCatEsp32 source code works?  Do you want to modify that source code to make this Bittle robot do things that are not currently possible?  Speaking for myself, "I do, I am and yes already!". To facilitate my own understanding and those of like-minded hobbyists, I created the attached "OpenCatEsp32 Code Walkthrough for the Bittle with BiBoard" slide deck.  It is longish work (currently nearly 70 slides) that covers, at a relatively high level, the workings of this source code.  Hopefully that means there is something useful for you, regardless of your background. To be clear, all opinions, observations, and assertions are my own, as are any mistakes.  Although I cannot make any promises, it is my desire to periodically update this code walkthrough, both to correct any mistakes and to make updates as the source code evolves.  Therefore, please reply to this post with any suggestions or corrections you may have regarding this code walkthrough. Special thanks go to the Petoi team for insightful software discussions along this "path" to understanding!
OpenCatEsp32 Code Walkthrough for the Bittle with BiBoard content media
4
3
81
este este
May 08, 2024
In Clinic
Lately, I have been working on some software (Windows using Visual Studio in C# / .NET) to turn my laptop into a "brain" for the "Bittle with BiBoard" robot.  To keep things simple, I want to use the well established bidirectional serial streaming communication of the Bluetooth Classic Serial Port Profile (SPP).  By simple, I mean in contrast to the more complicated client-server option that is the Bluetooth Low Energy (BLE) with Generic Attribute (GATT) Profile.  The ESP32 in the BiBoard supports both options and, I believe, the OpenCatEsp32 source code supports both as well (but see below). Why is this simpler?  Mainly because it is easier to code up a serial transceiver than to code up a GATT client.  Also, it is a better fit to this use case because the SPP was designed for serial streaming whereas the GATT is meant for short message exchanges. Here is the problem.  I can only occasionally establish bidirectional Bluetooth communication between the Bittle with BiBoard and my Windows laptop using an SPP communication port.  I do this by pairing the laptop with the Bittle and checking if I can send and receive over the Bluetooth SPP communication port that gets created.  If I get a bidirectional communication, I move on to further coding work but if I only get unidirectional communication, I unpair, delete the com ports created and try pairing again.  Eventually (1 out of 10 tries) I get a Bluetooth SPP bidirectional communication (but see below). Before anyone asks, I am using the "Outgoing" port that specifically says "'ESP32SPP", meant for this SPP communication purpose, not the "Incoming" port that is also created.  And also before anyone can ask this too, the "Incoming" port can only be initialized by the Bittle, not the laptop but this is not my use case, since I want the laptop to initiate and control the communication. After getting a Bluetooth port that is bidirectional, I send Bittle commands and receive readbacks.  However, after a short while (15 min) of back and fourth communication, the port becomes unidirectional.  The laptop can send commands but not receive any readbacks. So, has anyone tried such bidirectional Bluetooth Serial Port Profile (SPP) communication?  If so, what kind of reliability have you experienced?  More importantly, what might the source be of any unreliability in such communication?  I have looked at the OpenCatEsp32 source code but have not found any obvious problems.  Is anyone interested in this capability and in combining efforts to search for the source (and fix) of this apparent (at least in my hands) unreliability? BTW, I have searched the forum and the closest I found was this post by "Kevin KO" (and related comments):  https://www.petoi.camp/forum/hardware/bluetooth-two-ways-communication-question.  It sounds like my use case and that of the poster are similar, even though our software tools and Bittle robots (NyBoard with Bluetooth module vs BiBoard with built in Bluetooth) are different.
SOLVED:  In Search of Reliable Bidirectional Bluetooth Serial Port Profile (SPP) Communication content media
1
10
78
este este
May 01, 2024
In Hardware
Periodically, we've seen posts in the forum about 3D printing parts for our robots.  But did you know that there is a Petoi GitHub repo of stl and 3mf files for various Nybble and Bittle parts and accessories?  These can be found at https://github.com/PetoiCamp/NonCodeFiles/tree/master/stl.  Note that when you click on an stl filename (but not a 3mf filename), GitHub renders the part so you can examine it before you download it.  You can spin the part, using the mouse, to examine all sides and, when you do spin it, after a few seconds, GitHub will spin it slowly for you which is pretty cool! If you are having trouble putting those pesky springs into Bittle then 3D printing the springInstaller.stl file might help: If you have the Mu Intelligent Camera, this Bittle mouth-mount, MuIntelligentCamera_mount.stl, might be useful: Which looks like this (pictures from petoi.com) Another one I like is this test stand, BittleTestStand.3mf, shown here as a Cura image (since GitHub can't render it): Edit: The orientation of 1/2 of the BittleTestStand for 3D printing is now shown correctly. It works like this (note that this appears to be a computer rendered image, not a picture since you have to print the  BittleTestStand.3mf twice and glue the pieces back to back but this image does show any seam!): Here is a list of the stl files in this repo that I find most interesting (includes the above): • springInstaller.stl • MuIntelligentCamera_mount.stl • BittleStand (a folder with BittleTestStand.3mf, standWithCalibration.3mf, and standWithCalibration.stl, plus pictures) • Bittle_hookForCarryingCargoUnderBelly.stl • Bittle_bone.stl • BittleNeckLock ( a folder with 2 neck locks, neckLockSmall.stl and neckLockLarge.stl, plus instructions)
3D Print Parts For Nybble and Bittle content media
2
7
127
este este
Apr 29, 2024
In Clinic
If your program is taking too long to upload to the BiBoard, you might check the Upload Speed in the Arduino IDE. An Upload Speed of 115200 is commonly the default: However, you can upload faster - I have been using the highest Upload Speed of 921600. This brings my upload times down from about 1:14 @115200 baud to about 0:17 @ 921600 baud. This is over 4x quicker. It's not the 8x you might expect from the ratio between these baud rates but it is worth it. BTW, this is just the Upload Speed. I still have the serial monitor set to the default of 115200 baud.
Is your program upload to the BiBoard taking too long? content media
2
0
11
este este
Apr 28, 2024
In General Discussions
Introduction: There have been questions and comments at Camp Petoi regarding comparisons between the NyBoard V1 and the BiBoard V0_1 or V0_2.  The context is "Which is better?" but I think the real question is "Which is better for you right now?".  I'd like give my answer to that latter question, based on what I've learned from working first with my Nybble (NyBoard of course) and then by upgrading my Bittle from a NyBoard to a BiBoard V0_2. Let's start with some specifications... • The NyBoard uses an 8-bit Atmel ATMega328 single chip microcontroller that operates with a single core at up to 20 MHz (up to 20 MIPS), same as the Arduino Uno.  An int type consumes 2 bytes to be memory efficient but with a limited range.  It has only 32 KB of flash memory, used for storing program code, and only 2 KB of SRAM, used for storing variables.  The NyBoard is a microcontroller with modest processing power where every byte of memory is precious. • The BiBoard uses a 32-bit Espressif ESP32-WROOM-32D "system on a chip" (SoC) microcontroller that operates with two cores at up to 240 MHz (up to 400 MIPS).  An int type consumes 4 bytes which is less memory efficient but with a wider range.  Furthermore, it is an actual "system" with more features (like built in Bluetooth and WiFi) that further consume memory.  Still, the specific chip (ESP32-DOWD) in the BiBoard has available16 MB of flash memory of which about 4.5 MB can be configured for storing program code AND this chip has approximately 320 KB SRAM available for storing variables.  The BiBoard is a microcontroller with strong processing power where every byte of memory is (relatively) cheap. and then some observations... • The NyBoard is an Arduino Uno compatible which means that the wealth of information on the Arduino Uno will likely directly apply.  This makes the NyBoard a great introduction to microcontroller driven robotics.  It is plenty capable for the current features we see in the Petoi robots.  However, the amount of memory space for code and for variables is, by comparison, limited.  This makes compiling programs faster but puts constraints on what additional features can be added.  Petoi has done amazing work making the OpenCat source code very memory efficient but we are almost out of memory at compile time.  Expansion of robotic capabilities is therefore more difficult with the NyBoard. • The BiBoard is based on a very different architecture so it is not an Arduino Uno compatible.  Furthermore, the Arduino IDE is not natively compatible with ESP32 boards.  Fortunately, as explained on the Petoi website (see https://docs.petoi.com/arduino-ide/upload-sketch-for-biboard ), you can make that IDE compatible with the BiBoard.  In my experience, information on the ESP32 is harder to find and harder to understand when you find it.  That makes the BiBoard more suitable for the hobbyist who has some prior experience with Arduino compatible boards before learning how the ESP32 differs.  Such "system on a chip" (SoC) boards are more complex so their programs are larger and take longer to compile.  The payback you get with the BiBoard is plenty of memory, much more processing power and the OpenCat32 source code that allows easier expansion of robotic capabilities by both the Petoi team and individual Petoi Campers.  with different levels of control you can have over the Petoi robots... • The lowest level of control requires the no programming skill, because it uses the Petoi App for Android or iOS.  This great for play with either board. • The next level of control requires some programming skill through the use of the "block-based" programming environment by Mind+ (See here and here).  The program is composed in the Mind+ graphical user interface on a computer and then serial commands are sent to the robot when the program runs.  With this control, there is still little difference between the NyBoard and the BiBoard. • Still higher control is possible with some coding skill using the Python language.  This involves writing code in Python on a computer that then also sends serial commands to the robot.  With this control as well, there is still little difference between the NyBoard and the BiBoard. • At the highest level of control, you need coding skills in the C++ language using e.g. the Arduino IDE.  Here, you are modifying a local copy of the OpenCat or OpenCat32 source code.  With this level of control, the BiBoard has the advantage due to the memory limitations of the NyBoard. which brings me to these conclusions... • If you mostly want to play with a cool robot then a Bittle with either board is good. • If you are just learning to program and you want to use either "block-based" or Python programming then a Bittle with either board would be good. • If you are just learning to program and you want use the C++ language but stay in the Arduino compatible realm then it might be best to use the Bittle with the NyBoard. • If you already have some C++ Arduino coding experience and you want to move to the wider world of C++ with the ESP32, the Bittle with BiBoard is where it's at. Hope this helps! References: 1.       https://en.wikipedia.org/wiki/ATmega328 2.       https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32d_esp32-wroom-32u_datasheet_en.pdf 3.       https://docs.espressif.com/projects/esp-idf/en/v4.3/esp32c3/hw-reference/chip-series-comparison.html 4.       https://www.petoi.com/blogs/blog/petoi-robotics-c-python-curriculums-coming-in-aug
3
3
249
este este
Apr 27, 2024
In Basic Assembly and Setup
I have found that the online instructions for the Petoi robots are VERY comprehensive (that's great!) but they can be hard to follow mainly because they are not very linear due to cross links among many web pages. When I recently upgraded my Bittle from having a NyBoard to having a BiBoard with Hat Extension, I took some notes that tried to "linearize" the online instructions. In the hopes that those notes may help others, I have attached the file, titled "My Bittle BiBoard Software Setup Instructions by este este v1.1.pdf". Let me know if you find it useful!
4
4
46
este este
Apr 26, 2024
In Software
I like the small beep at the end of bootup in OpenCat32 but I am growing very tired of hearing the melody that plays at the beginning of bootup. How can I silence (but not delete) that boot up melody?
0
24
104
este este
Apr 23, 2024
In Software
The IMU (inertial measurement unit) allows a robot to orient in its environment by perceiving YPR, i.e. Yaw, Pitch and Roll rotations, typically along the robot's z, y, and x axes, respectively. The IMU also allows perception of acceleration in the framework of the IMU itself (Real x, y and z directions) or in the framework on the robot's environment (World x, y, and z directions). Depending on the robot, the main uses of the IMU are for navigation (get/maintain robot movement heading using Yaw) and balancing (feedback/correction using Pitch and Roll). For most wheeled robots, stability is not a factor so the IMU is used for navigation. However, for legged robots like the Nybble and Bittle quadrapeds, stability can be a concern so the IMU can be used for balancing but navigation with the IMU can also be important. I mention this because I recently did a code review of OpenCatEsp32 and discovered that the current code uses one bool variable, gyroBalanceQ, as both the on/off switch for reading of IMU data for any purpose and the on/off switch for using such IMU data to balance the robot. I like the balance capability but sometimes I want to turn it off but not lose access to the IMU data for navigation. I therefore made some code changes in my forked repo of OpenCatEsp32. First I added a new bool variable in the global variables section of OpenCat.h, just under bool gyroBalanceQ: bool imuDataReadQ = true; Next, I modified readEnvironment() in io.h: if (gyroBalanceQ && !(frame % imuSkip)) was changed to... if (imuDataReadQ && !(frame % imuSkip)) And that is it! As long as imuDataReadQ is true, you will have IMU data, regardless of balancing being on or off. One could also add some more code to change imuDataReadQ programatically but that doesn't fit my current use cases. Since I believe this is generally useful, I will do a pull request from my fork into the Petoi OpenCatEsp32 repo for consideration. In the meantime, you can make changes to your own code in this way if you want this capability now. P.S. The same is true for the OpenCat repo except readEnvironment() is in imu.h. I am not using that repo so I will leave such changes there for others to make. P.P.S. I had not previously seen the use of a "Q" suffix in a bool variable name to indicate interrogative code reading syntax (as in a Question mark). I am more of an "isSometingTrue" code reading syntax person but I rather like the use of "Q" in that way! Edit: I change the bool name from ImuDataReadQ to imuDataReadQ to conform to the preference for camelCase in OpenCat32 rather than PascalCase (though, being a public variable, an argument could be made for PascalCase which is commonly used for public method and property names - not the same, I know but the same concept! 😀 )
0
6
83
este este
Apr 04, 2024
In Hardware
Here I am sharing a diagram I made for myself to remember which Grove connectors are which, on the BiBoard Hat Extension, in case others find it useful.
BiBoard Hat Extension and identifying the Grove connectors content media
2
0
28
este este
Apr 03, 2024
In Basic Assembly and Setup
Not sure if this is the best section to post this but, over time, I have upgraded my Bittle from having a NyBoard (fun!) to a BiBoard v0_1 (more memory, faster CPU, more fun!) to, recently, a BiBoard v0_2 with Hat Extension (with integrated voice module and Grove connectors, ultimate fun!). In this journey, I made the following diagram that mixes images already on the Petoi website to visually map the servo indexes with the board pin numbers. Perhaps others will find it useful.  I also used 6 mm P-Touch® labels, with the same info, affixed to the servo connectors. This made it easy to swap boards.
BiBoard Servo-to-Pin Map content media
3
1
63

este este

Forum Moderator
More actions
bottom of page