Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: ROS controlled Bioloid with custom sensors

  1. #1

    Post ROS controlled Bioloid with custom sensors

    Hi to all!

    This is my current in-progress project involving the Bioloid robot. The general plan for hardware is to extend the base platform with various components, avoiding the need for custom electronic boards as far as possible, as I want my main focus to be on software.

    A Raspberry Pi 2 will be the on-board brain of the robot, and the Dynamixel servos will be controlled by a USB2AX. As for sensors, the current plan is to use a MinIMU-9 v3 for tilt/orientation sensing, and a number of force sensing resistors on the feet. Very conveniently, the undersides of the Bioloid’s feet have indents in their four corners which perfectly match the shape of the FSRs! A Pololu A-Star 32U4 (essentially an Arduino board) will perform the data collection and pass it over to the PC via serial-to-USB. That is as far as my current considerations go in terms of hardware. At some point I will look into vision, which may be as simple as a normal webcam.The basic hardware has been wired up and tested, so now it needs to be mounted to the Bioloid's frame.

    I am using ROS as the main development platform, with code in C++. I have set up Raspbian with ROS on the Pi, but am currently testing everything on a Linux laptop. Currently the A-Star serves ROS messages to the laptop with the sensor information. It may potentially perform other functions if it has the processing power to spare, but for now there is no need. A ROS service running on the laptop interfaces with the Dynamixel servos, instructing the servos to move, reading their feedback and publishing the robot’s joint states to various other ROS nodes. A full VR counterpart for the Bioloid has been interfaced with ROS using URDF and RViz to display. I have also set up the robot in MoveIt!, but have not yet used it much.

    I have set up a project page on the forum here, where you can see some initial images.

    That is all for now. I will be updating my progress as regularly as I can at: https://dxydas.wordpress.com

    Thanks for reading!

  2. #2
    Join Date
    Dec 2012
    Location
    Los Angeles, CA
    Posts
    852
    Images
    25
    Rep Power
    86

    Re: ROS controlled Bioloid with custom sensors

    Great start! Welcome to the world of ROS.

  3. #3
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,289
    Images
    27
    Rep Power
    276

    Re: ROS controlled Bioloid with custom sensors

    Wow, it's one of the old comprehensive kit humanoids. Guessing you've not gotten much use out of it yet, else the chest would be held together with nothing but tape. It may last quite a while, but you will probably eventually have to rebuild it into a Premium kit Type-A humanoid (slight change to feet and widened hips for stabler walking).

    The indentations in the feet for the 0.2" FSR are not great for actually getting meaningful information. The FSRs will require small pieces of tape in the active sensing area to 'calibrate' them (spacer around perimeter of FSR requires a bit more force to compress than bot typically places on foot) and then another layer of tape to protect the 'calibrated' FSRs from wear. I used a layer of kapton directly over the FSRs stuck to the foot with varied stacks of 2~4mm squares of duck/duct/gaffer tape for the 'calibration', then covered the toe and heel areas in another layer of kapton to hold everything in place. Pretty sure I then added an additional layer of duck/duct/gaffer tape over the entire foot for grip. The kapton keeps the FSRs clean/protected so that you can just replace the duck/duct/gaffer tape as it wears without damaging the FSRs.

    There were Foot Pressure Sensor dynamixel device board produced by Jon Hylands several years ago, but they sold out at least two years ago and there has not been another manufacturing run. There are self-contained FSR feet for the DARwIn-OP, but they are pretty expensive and not terribly useful.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  4. #4
    Join Date
    Mar 2015
    Location
    Texas
    Posts
    342
    Images
    15
    Rep Power
    33

    Re: ROS controlled Bioloid with custom sensors

    This is very cool! I like what you've done so far and will be looking forward to seeing more.

    Your wordpress site is nice too. You demonstrate a clear understanding of the components you've worked through.

    Do you know what your plans are for mounting the Pi with display? It almost looks like you could fit it in the chest area.
    01001001001000000100110001101111011101100110010100 10000001010010011011110110001001101111011101000111 0011

    My Instagram
    My YouTube

  5. #5

    Re: ROS controlled Bioloid with custom sensors

    Thanks!

    It is indeed the old Comprehensive kit (the second version where the servos where updated to 12+'s, but the torso servo was removed). It may look unscathed, but it had an incident where the battery overheated and melted the CM-5 enclosure! Luckily the CM-5 itself is fine (although I'm not using it now) and the main torso was only lightly damaged. Also, the shoulder servos are sounding a bit creaky so don't know how much longer they will last.
    Looking at all the hex spiders on the forum makes it very tempting to try the kit's spider-mode again! I have built it before but only ran the basic motion programs on it.

    As for the FSRs, I've only quickly checked that they report reasonable values when pressed-depressed, so thanks for the calibration tips. I was not expecting much from them other than being able to broadly tell what the load distribution on the feet is.

    The Pi display was bought on a whim as I just couldn't resist trying it out! I'm sure it will have good use on the Bioloid though. I'm going to try mounting it in place of the head, in the orientation shown in the images, using the rest of the parts from the kit as a frame. This way it could be used as the robot's face. But then again, it would fit nicely on the back as it could sit where the CM-5 used to be ...

  6. #6
    Join Date
    Mar 2015
    Location
    Texas
    Posts
    342
    Images
    15
    Rep Power
    33

    Re: ROS controlled Bioloid with custom sensors

    Quote Originally Posted by m3atsauc3 View Post
    The Pi display was bought on a whim as I just couldn't resist trying it out! I'm sure it will have good use on the Bioloid though. I'm going to try mounting it in place of the head, in the orientation shown in the images, using the rest of the parts from the kit as a frame. This way it could be used as the robot's face. But then again, it would fit nicely on the back as it could sit where the CM-5 used to be ...
    It does look neat as a head. You could display a face on the screen or gauges that look like a face Would that give you a lot of weight up top to contend with?

    No matter where you put it I'm guessing you have to plan ahead as much as possible for a crash/fall over.

    What do you have up next in your ROS plans?
    Last edited by r3n33; 06-05-2015 at 07:44 PM.
    01001001001000000100110001101111011101100110010100 10000001010010011011110110001001101111011101000111 0011

    My Instagram
    My YouTube

  7. #7

    Re: ROS controlled Bioloid with custom sensors

    I've now mounted the Pi as the head. I'm trying a simple GUI with Python and Tkinter for the Pi (first time writing in Python!).

    With ROS I currently want to get the servo comms working on the Pi as they have been on the laptop. As I'm still working on different bits and pieces all over the robot, I haven't pushed MoveIt! any further, but that will be my future goal in order to get some cool movements.

    I will post some updated images of the build soon.

  8. #8

    Re: ROS controlled Bioloid with custom sensors

    Short update - I've made a simple bracket to hold the Pi "head":

    Click image for larger version. 

Name:	img_20150618_205543.jpg 
Views:	425 
Size:	78.2 KB 
ID:	6048Click image for larger version. 

Name:	img_20150618_204325.jpg 
Views:	390 
Size:	116.1 KB 
ID:	6049Click image for larger version. 

Name:	IMG_20150618_204314.jpg 
Views:	376 
Size:	127.7 KB 
ID:	6050

    Also made a simple Python GUI to visualise the IMU data:

    Click image for larger version. 

Name:	Screenshot from 2015-06-18 20:37:30.png 
Views:	359 
Size:	24.3 KB 
ID:	6051

  9. #9
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,289
    Images
    27
    Rep Power
    276

    Re: ROS controlled Bioloid with custom sensors

    Kinda relevant since you now have a fairly well secured optoelectronic head/face/eyes... I know they are pretty old and I've linked them before, but squishy robots* are just so adorable. I also seem to remember a fluffy red dragon of sorts that used an android phone for a face, but cannot recall the name. Thus far, I've been unsuccessful in trying to make myself buy one of the larger adafruit LCD shields for my old RPi-B so I can try stuffing it into a well-sealed mostly-squishy-bot with removable, washable, fuzzy cover (thinking a Cheshire cat).

    *The smaller one (miso) uses the relatively high and large mass of the head (thinking it's a modified chumby) to let it perform a rocking waddle for emotive effect and/or clearing small obstacles caught in the wheels. Don't remember if the internals were ever shown, but I'm thinking miso uses one AX-12 for the head pan and only two AX-12 in the base with arms+linkages connected to the sides of the head/neck for the squatting/rocking action.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  10. #10

    Re: ROS controlled Bioloid with custom sensors

    Some padding such as that used by Miso would definitely be a good idea, as the Pi touchscreen no longer works, and I am guessing it might be because I dropped it (although it was not on the robot at the time). At least the screen works fine still!

    Progress is slow at the moment, I played around with Gazebo briefly, but have mainly been investigating the MoveIt! APIs and have mixed success. I was wondering if anyone who has used MoveIt before knows what type of IK solver the graphical interactive marker in the RViz plugin uses?
    I'm asking this, because in RViz I can move the robot's limbs with ease, but am struggling with the Move Group Interface. In RViz I can move the leg in any direction, as you can see in the first screenshot. The arms were initially restricted to rotation around one axis only (elbow), but I found that if I enable the "Allow Approximate IK Solutions" checkbox, I can then move them around freely with the visual marker.
    Using the move group interface in a test C++ function, my main issue is that the default IK solver (and another I tried) is very prone to ending up with self collisions. This is not a problem when using the RViz plugin, unless I purposefully make a movement that leads to a collision.
    So I disabled all self collisions (in the MoveIt setup assistant), then got so far as making slight positional displacements of the foot using setJointValueTarget(). This is simply done by getting the current foot pose and incrementing its position by a a small amount (result in second screenshot). I cannot achieve the same however with computeCartesianPath(), if I try and use the same target pose. I tried a small and large "eef_step" parameter for computeCartesianPath(), but to no avail.

    I would like to get the Cartesian Path method working, as this seems like the obvious way of generating trajectories for the feet. But even then, the issue with the self-collisions is not solved, which is puzzling because I have no problem moving the legs around in RViz!
    Does anyone have any ideas/suggestions?


    Here is the simple test function:
    Code:
    #include "ros/ros.h"
    #include <moveit/move_group_interface/move_group.h>
    #include <moveit/planning_scene_interface/planning_scene_interface.h>
    #include <moveit_msgs/DisplayTrajectory.h>
    
    
    int main(int argc, char **argv)
    {
        ros::init(argc, argv, "moveit_api_test");
        ros::NodeHandle node_handle;
        ros::AsyncSpinner spinner(1);
        spinner.start();
    
        // This sleep is ONLY to allow Rviz to come up
        sleep(10.0);
    
        bool success;
        moveit::planning_interface::MoveGroup group("right_leg");
        moveit::planning_interface::PlanningSceneInterface planning_scene_interface;
        ros::Publisher display_publisher =
                node_handle.advertise<moveit_msgs::DisplayTrajectory>("/move_group/display_planned_path", 1, true);
        moveit_msgs::DisplayTrajectory display_trajectory;
    
        ROS_INFO("Reference frame: %s", group.getPlanningFrame().c_str());
        ROS_INFO("End-effector link: %s", group.getEndEffectorLink().c_str());
    
        //group.setPlannerId("PRMkConfigDefault");
    
    
    // THIS METHOD SUCCEEDS IN RAISING THE FOOT
    //    // Planning to a joint-space goal
    //    geometry_msgs::Pose target_pose = group.getCurrentPose().pose;
    //    //target_pose.position.x += 0.02;    // Foot forward
    //    //target_pose.position.y -= 0.02;    // Foot out
    //    target_pose.position.z += 0.02;      // Foot up
    //    group.setJointValueTarget(target_pose);
    //    group.setPoseTarget(target_pose);  // This also works!
    //    //
    //    // Now, we call the planner to compute the plan
    //    // and visualize it.
    //    // Note that we are just planning, not asking move_group
    //    // to actually move the robot.
    //    moveit::planning_interface::MoveGroup::Plan my_plan;
    //    success = group.plan(my_plan);
    //    ROS_INFO("Visualizing move %s", success ? "SUCCESS" : "FAILED");
    //    // Sleep to give Rviz time to visualize the plan
    //    sleep(10.0);
    ////
    
    
    //// THIS METHOD FAILS IN RAISING THE FOOT
        // Cartesian Paths
        std::vector<geometry_msgs::Pose> waypoints;
        geometry_msgs::Pose target_pose = group.getCurrentPose().pose;
        //target_pose.position.x += 0.02;    // Foot forward
        //target_pose.position.y -= 0.02;    // Foot out
        target_pose.position.z += 0.02;      // Foot up
        waypoints.push_back(target_pose);
        //
        moveit_msgs::RobotTrajectory trajectory;
        double fraction;
        fraction = group.computeCartesianPath(waypoints, 0.01, 0.0, trajectory, false);
        ROS_INFO("Visualizing cartesian path (%.2f%% achieved)", fraction * 100.0);
        // Sleep to give Rviz time to visualize the plan
        sleep(10.0);
    //////
    
    
        ros::shutdown();
        return 0;
    }
    And here is an extract of the ROS logs during a failed motion plan to raise the right foot, using computeCartesianPath() with one waypoint:
    Code:
    [ INFO] [1437500025.666343121]: Loading robot model 'bioloid'...
    [ INFO] [1437500025.915868974]: Ready to take MoveGroup commands for group right_leg.
    [ INFO] [1437500025.916003298]: Looking around: no
    [ INFO] [1437500025.916080666]: Replanning: no
    [ INFO] [1437500026.617147315]: Ready to take MoveGroup commands for group right_leg.
    [ INFO] [1437500026.621422135]: Reference frame: /odom
    [ INFO] [1437500026.621573685]: End-effector link: right_ankle_lateral_link
    [ INFO] [1437500026.936034568]: Received request to compute Cartesian path
    [ INFO] [1437500026.936446691]: Attempting to follow 1 waypoints for link 'right_ankle_lateral_link' using a step of 0.010000 m and jump threshold 0.000000 (in global reference frame)
    [ INFO] [1437500026.961258329]: Computed Cartesian path with 1 points (followed 0.000000% of requested trajectory)
    [ INFO] [1437500026.962059559]: Visualizing cartesian path (0.00% achieved)

    Click image for larger version. 

Name:	Screenshot from 2015-07-20 23:58:09.jpg 
Views:	438 
Size:	60.2 KB 
ID:	6111

    Click image for larger version. 

Name:	Screenshot from 2015-07-09 22:24:28.jpg 
Views:	424 
Size:	52.9 KB 
ID:	6113

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question(s) On Bioloid: How to read the sensors' value with Matlab?
    By cybernetics in forum Software and Programming
    Replies: 17
    Last Post: 08-08-2011, 10:57 AM
  2. Sensors! Where can I find sensors!
    By pengyou in forum Arbotix, Microcontrollers, Arduino
    Replies: 7
    Last Post: 06-12-2011, 08:58 PM
  3. Implementing a custom Bioloid Device from an Arduino
    By Xevel in forum Software and Programming
    Replies: 3
    Last Post: 02-14-2011, 09:25 PM
  4. SRV-1 Custom USB Interface
    By middleton.s.a in forum Arbotix, Microcontrollers, Arduino
    Replies: 0
    Last Post: 03-01-2010, 03:22 PM
  5. Bioloid Banana Bot - Custom bioloid humanoid
    By Suicidal.Banana in forum Humanoids, Walkers & Crawlers
    Replies: 2
    Last Post: 10-24-2009, 11:13 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •