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

Abdur Rosyid's Blog

Just a few notes on mechanical engineering and robotics

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

ROS1 Launch File

July 8, 2021 by Abdur Rosyid

ROS launch is a very useful command as it is capable to: run multiple nodes at the same time. set parameters. perform rosparam commands. set execution options. ROS launch file (.launch) is an XML file which looks like below. As it is an XML, indentation matters. An example launch file that sets a parameter: In …

Continue Reading

ROS Bag

July 7, 2021 by Abdur Rosyid

ROS bag is used to record ROS messages and afterwards they can be played. This is very useful to record ROS messages published by robot’s sensors in a real test and later this data can be played without a need to perform another real test. Hence, this is particularly useful when the robot programming needs …

Continue Reading

Creating Custom Messages

July 8, 2021 by Abdur Rosyid

There are three types of messages in ROS: msg : used in topic srv : used in service action : used in action The msg message is defined in an .msg file, which looks like this: data_type variable_1 data_type variable_2 One or more .msg files are typically created inside a folder called “msg”. ROS topic …

Continue Reading

ROS Parameters

July 7, 2021 by Abdur Rosyid

ROS parameters are parameters in a node which can be modified from their default values. By this definition, the ROS parameters are very useful to be used when we want to be able to modify them quickly, in real-time. ROS parameters can be, for example, USB port numbers, camera calibration parameters, or minimum and maximum …

Continue Reading

Creating ROS1 Action

July 9, 2021 by Abdur Rosyid

Below are the steps to create a ROS1 action:

Step 1: Add the following in package.xml

roscpp # Use this if the action is in C++
rospy # Use this if the action is in Python
actionlib
std_msgs
message_generation
actionlib_msgs
roscpp # Use this if the action is in C++
rospy # Use this if the action is in Python
actionlib
std_msgs
message_runtime
actionlib_msgs
(more…)
Continue Reading

ROS Action

July 9, 2021 by Abdur Rosyid

Different from ROS service which consists of request and response only, ROS action additionally provides feedback. An action consists off three main parts: request, feedback, and result (which is similar to response in service). While a service is appropriate to be used for a non-progressive task, an action is appropriate to be used for a …

Continue Reading

Creating ROS1 Service in Python

July 8, 2021 by Abdur Rosyid

The following are some steps to create a ROS1 service in Python: Step 1: Add the following in package.xml rospy std_msgs message_generation rospy std_msgs message_runtime Step 2: Add the following in CMakeLists.txt find_package(catkin REQUIRED COMPONENTS message_generation std_msgs rospy) add_service_files(FILES ServiceName.srv) generate_messages(DEPENDENCIES std_msgs) catkin_package( LIBRARIES package_name CATKIN_DEPENDS std_msgs rospy ) catkin_install_python(PROGRAMS script/service_server.py DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) catkin_install_python(PROGRAMS …

Continue Reading

Creating ROS1 Service in C++

November 10, 2021 by Abdur Rosyid

The following are some steps to create a ROS1 service in C++:

Step 1: Add the following in package.xml

roscpp
std_msgs
message_generation
roscpp
std_msgs
message_runtime

Step 2: Add the following in CMakeLists.txt

find_package(catkin REQUIRED COMPONENTS message_generation std_msgs roscpp)

add_service_files(FILES ServiceName.srv)

generate_messages(DEPENDENCIES std_msgs)

catkin_package(
LIBRARIES package_name
CATKIN_DEPENDS std_msgs roscpp
)

include_directories(${catkin_INCLUDE_DIRS})

add_executable(service_server src/service_server.cpp)
add_dependencies(service_server ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(service_server ${catkin_LIBRARIES})

add_executable(service_client src/service_client.cpp)
add_dependencies(service_client ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(service_client ${catkin_LIBRARIES})
(more…)
Continue Reading

ROS Service

July 7, 2021 by Abdur Rosyid

Different from topic, service is bidirectional communication between a service server and a service client. The service can be described as the following sequential mechanism: A service client makes a request to a service server The service server sends a response to the service client The communication between the service client and the service server …

Continue Reading

Posts pagination

  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • …
  • 13
  • Next

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