Creating a custom ROS node for our application
In Chapter 11’s Creating an ROS workspace and package section, we outlined how to set up a circle
node for TurtleSim robot control. Following this blueprint, we’ll now create a robot_control
node on the ROS-equipped Ubuntu system from Chapter 11. This involves setting up a new ROS workspace and package for the robot_control
node, enabling us to control the TurtleSim robot using our new IoT joystick.
To ensure clarity and avoid any potential mix-up with the existing circle
node, we’ll create a new workspace and package for the robot_control
node, despite the possibility of reusing those from Chapter 11. This approach allows us to maintain distinct environments for each project.
Creating our custom robot_control node
As we have already installed the paho-mqtt
Python library onto our Ubuntu installation, we will not need to install it again.
To create our new node, we do the following:
- We open an Ubuntu...