Thanks for the hard work Max has put into this project. I am very impressed by his knowledge and diligence.
I am intrigued by his introduction about MoveIt on the home page and just wonder whether there is a plan for integration of ROS and MoveIt into this project. It would make Dobot much more useful and make it easier to integrate other sensors and hardware. Thanks.
I am just starting to learn how ROS works. To my limited knowledge, I would assume the integration would be accomplished through serial communications with the arduino, i.e. publisher and subscriptor etc. I understand that ROS would replace some of the python code function. I am still trying to figure out where firmware hex code, driver code and your original python code stand in the whole scheme. Can you elaborate a little bit how this could be accomplished in your mind and what work would be needed. Hopefully some capable individuals among us in the community could chip in to get this accomplished. Thanks again.
Not quite. You'll need to create a ROS node that talks to DobotSdk. That ROS node will need to publish the pose to a topic (so that you could visualize it or just monitor raw data) and subscribe to a topic that you'll be sending new pose to follow (or a service to command through, wiki.ros.org/ROS/Concepts).
Arduino with open-dobot firmware on the board accepts custom commands that are described in DobotDriver. DobotSdk provides high-level functions hiding all the comms complexity behind. All you need to tell SDK to do is where to move the arm.
ROS itself has no idea how to talk to Arduino with open-dobot flashed nor how to talk to the stock firmware. ROS is modular system that requires a node to any specific hardware (you can think of it as a driver to ROS, much like a driver for piece of hardware to work in Windows or MacOS).
"Arduino with open-dobot firmware on the board accepts custom commands that are described in DobotDriver. DobotSdk provides high-level functions hiding all the comms complexity behind. All you need to tell SDK to do is where to move the arm."
I assume the commands are in the form of serial command according to DobotDriver coming from the ROS node. DobotSdk interpret the command to form a pose. In turn, Arduino board sends back serial communication about the pose to ROS node. ROS gives next command through the node, repeat the above cycle. Am I understand this correctly?
From top to bottom: 1. ROS node calls SDK functions to move the arm (by passing desired pose) and to retrieve current pose 2. SDK translates the desired pose into a series of low-level commands (by splitting the path into 20ms segments taking into account desired acceleration/deceleration) and passes them to DobotDriver 3. DobotDriver passes low-level commands to Arduino
Great. That made it very clear to me from where to begin.
I welcome others to join the efforts to make this project a reality. The ultimate goal is to make this arduino control system a modular system so you can modify the type of motors used and arm design in the SDK (this topic should belong to another thread), then plug the system to ROS and explore the immense possibilities ROS can bring in.
.urdf file in ROS to describe the 'arm' with the appropriate joints and links. joint_state_publisher node robot_state_publisher node Arduino ROS node to subscribe to the joint_states topic serial_node in the ROSserial python package
Topics would be preferred as you don't need a response from SDK as long you publish current pose.
The approach on the video is not the best, I guess it's just a simple try to get something working. There are plenty of resources on ROS. If you want to make it right you'll have to go through wiki.ros.org/urdf/Tutorials which has TF as prerequisite. Have a look at github.com/uArm-Developer/UArmForROS which has all the bits and pieces to start. uarm_python.py is effectively replaced by DobotSDK and adapted accordingly. The interface is primitive but that's a good start to get closer to MoveIt.
If your goal is to just send coordinates where to move to without any fancy trajectory planning (i.e. if there are no obstacles to avoid when moving from current location to destination) then you don't need ROS at all. I'm not mentioning the "unreachable pose" problem as the arm has only 3 joints and limits that are quite simple to compute for which MoveIt is an overkill.