ROS: GoPiGo3 ROS2 Node Design Findings

After patting myself on the back a little for getting a ROS2 GoPiGo3 node running, I started looking at what it is and does, and my unfamiliarity with both ROS and ROS2 design patterns is now front and center.

Namely:

  • The ROS1 GoPiGo3 node instantiates a joint_states publisher, but never publishes a joint_states topic. It appears the “ROS Way” (Component Based Software Engineering/CBSE) is for a robot node to use the joint_state_publisher node component which will have access to the URDF definition of the robot with all the robot’s joint information.

  • The ROS1 GoPiGo3 node contains major code to compute and publish a “transform”/pose of the robot in the surrounding coordinate frame to the topic /tf. The tf topic has been deprecated in ROS2 and superseded by /tf_static and /tf2 AND while It is recommended for new work to use tf2 directly as it has a cleaner interface. However tf will continue to be supported for through at least J Turtle. so it would appear the migrated ROS1 code will continue to function for at least four more years.

  • The ROS1 GoPiGo node has several services like power-on power-off, and reset-all which are of very limited or even questionable use. I suspect they have issues, and I don’t want to invest time to test and debug them. I could:

    • leave them migrated without testing (and documenting) them
    • leave them migrated (without testing) but disable them by commenting them out
    • remove them to not make my ROS2 node appear any more functional than I am testing

Since my goal has been to learn ROS2 by working through the ROS1 “Hands-On-ROS-For-Robotics-Programming” book as much as possible, and it would appear I have a “working enough to continue” ROS2 node. I am leaning toward leaving all the design questions untouched and simply move on to getting a ROS2 LIDAR node running.

I am already skipping learning the simulation half of ROS since Gazebo Classic crashes my desktop virtual machine, but my interest is less on the algorithms and more on making a GoPiGo3 ROS2 robot at this point. (The folks at answers.ros.org put me back a bit when I asked about Gazebo crashing and was told go ask the Gazebo folks, “Gazebo is not an integral part of ROS, it’s a stand-alone application which happens to have plugins which allow it to communicate with a ROS application.”)

It is tough to be patient with myself, navigating so many topics I need to learn.

2 Likes

Yes - you have decidedly taken off a big bite. I’m impressed that you’ve gotten as far as you have. I’m also just trying to get my robot navigating consistently, so haven’t looked at all of those nodes and services. You’re moving way faster than I had.
/K

2 Likes