In ROS1, for Cpp you use roscpp , and for Python, rospy . Both libraries are completely independent and built from scratch. It means that the API is not necessarily the same between roscpp and rospy , and some features are developed for one, and not the other. ROS2 has more layers. There is only one base library, named rcl , and implemented in C. This is the foundation which contains all of the ROS2 core features. Perbedaan ROS 1 VS ROS2
Konsep ROS 1 VS ROS 2 If you need to work with an existing ROS1 code base, but want to develop new features with ROS2, then you are not necessarily stuck. You can use the ROS2 package named ros1_bridge, which will make, as its name suggests, a bridge between ROS1 and ROS2 communications.
S witch ros1 to ros2 Well, it’s not as simple as that, and many people will tell you different answers. ROS1 is still strong, with many stable plugins, more documentation and 3rd party plugins. Eventually it will end, but you still have a few years before that. If you’re new to ROS (whether ROS1 or ROS2), then you should probably learn ROS2 fundamentals. But then it can also be interesting to get a taste of ROS1 too. Why? Because you may understand some things in ROS2 better if you also see how it’s done in ROS1. And also, some tools/packages you want to use may not yet be ported to ROS2, so you’ll have no choice but to use the ROS1 version of the package. In this case the ros1_bridge package will be useful (see next section).