Technical requirements
The exercise in this chapter does not require any new software or tools that we haven’t already seen in previous chapters. We will start by using Python and ROS 2. You will need an IDE for Python (IDLE or Visual Studio Code) to edit the source code.
Since this chapter is all about moving the robot arm, you will need a robot arm to execute the code. The one I used is the LewanSoul Robot xArm, which I purchased from Amazon.com. This arm uses digital servos, which makes the programming much easier, and provides us with position feedback, so we know what position the arm is in. The arm I purchased can be found at http://tinyurl.com/xarmRobotBook at the time of publication.
Note
If you don’t want to buy a robot arm (or can’t), you can run this code against a simulation of a robot arm using ROS 2 and Gazebo, a simulation engine. You can find instructions at https://community.arm.com/arm-research/b/articles/posts/do-you-want-to-build-a...