Skip to content
  • Home
  • About the Blog
  • About the Author
  • Sitemap

Abdur Rosyid's Blog

Just a few notes on mechanical engineering and robotics

Category: Robot Operating System (ROS2)

Writing C++ Publisher in ROS2

July 8, 2021 by Abdur Rosyid

There are three ways to to write a C++ publisher in ROS2, namely: Old-school approach Object-oriented (member-function) approach Local function (lambda) approach Below is an example of each approach to write a C++ node publishing “Hello World”. The code is taken from here: https://github.com/ros2/examples/tree/foxy/rclcpp/topics/minimal_publisher

Continue Reading

Creating Packages in ROS2

July 8, 2021 by Abdur Rosyid

Creating a C++ package Step 1: Create the package using the following CLI command: cd ~/ros2_ws/srcros2 pkg create [PACKAGE_NAME] –build-type ament_cmake –dependencies rclcpp std_msgs [OTHER_DEPENDENCY_PACKAGES] Step 2: Modify package.xml file for package dependencies of the created node(s). Step 3: Modify CMakeLists.txt.

Continue Reading

ROS2 vs ROS1 Packages

July 8, 2021 by Abdur Rosyid

ROS2 build system is colcon. In ROS1, the build system is catkin. What is the difference between ROS1 and ROS2 packages? In ROS1, you can mix C++ and Python nodes in a single package. In ROS2, as a standard practice, you either make a C++ package or a Python package. [Although as a non-standard practice, …

Continue Reading

ROS2 vs ROS1 Overlay Workspace

July 8, 2021 by Abdur Rosyid

In ROS1, the structure of an overlay workspace, called the catkin workspace, looks like this: workspace_folder: |–src |–CMakeLists.txt |–package_1_folder |– |–package_n_folder |–devel |–build |–install The catkin workspace is built by running “catkin_make” command. To rebuild a catkin workspace, simply delete all the folders inside the workspace but the “src” folder and subsequently run the “catkin_make” …

Continue Reading

ROS2 (Foxy) Installation

July 11, 2021 by Abdur Rosyid

The main tutorial page for ROS2 Foxy can be found here: https://docs.ros.org/en/foxy/index.html It is recommended to install a Long-Term Suppport (LTS) ROS2 distro. This tutorial describes the installation of ROS2 Foxy on Ubuntu 20. There are two ways to install ROS2: 1) from source and 2) from binary (Debian installer). Step 1: Make sure you …

Continue Reading

Posts pagination

  • Previous
  • 1
  • 2

Categories

  • STEM 101
  • Robotics
  • Kinematics
  • Dynamics
  • Control
  • Robot Operating System (ROS)
  • Robot Operating System (ROS2)
  • Software Development
  • Mechanics of Materials
  • Finite Element Analysis
  • Fluid Mechanics
  • Thermodynamics

Recent Posts

  • Pull Request on Github
  • Basics of Git and Github
  • Conda vs Docker
  • A Conda Cheat Sheet
  • Installing NVIDIA GPU Driver on Ubuntu

Archives

  • June 2025
  • July 2021
  • June 2021
  • March 2021
  • September 2020
  • April 2020
  • January 2015
  • April 2014
  • March 2014
  • March 2012
  • February 2012
  • June 2011
  • March 2008
© 2026 Abdur Rosyid's Blog | WordPress Theme by Superbthemes