Skip to content

Instantly share code, notes, and snippets.

View bayodesegun's full-sized avatar

bayodesegun bayodesegun

View GitHub Profile
<launch>
<arg name="topic_name" default="/test_topic" />
<arg name="message" default="Hello there!" />
<node pkg="rostopic" type="rostopic" name="rostopic_pub_node" output="screen" args="pub $(arg topic_name) std_msgs/String 'data: $(arg message)'" />
<node pkg="rostopic" type="rostopic" name="rostopic_echo_node" output="screen" args="echo $(arg topic_name)" />
</launch>
@bayodesegun
bayodesegun / sos_service.py
Last active March 16, 2023 03:05
Sample ROS Service Server and Client
#! /usr/bin/env python
# remember to make this file executable (`chmod +x`) before trying to run it
import rospy
from std_srvs.srv import Trigger, TriggerResponse
def trigger_response(request):
return TriggerResponse(
success=True,
message="Hey, roger that; we'll be right there!"
@bayodesegun
bayodesegun / sos_service.py
Last active August 11, 2018 13:08
A sample ROS Service (Server)
#! /usr/bin/env python
# remember to make this file executable (`chmod +x`) before trying to run it
import rospy
from std_srvs.srv import Trigger, TriggerResponse
def trigger_response(request):
return TriggerResponse(
success=True,
message="Hey, roger that; we'll be right there!"
)