[ROS in 5 mins] 015 - How to use remap in launch files
The Construct Robotics Institute 5:44
4,403 views · 42 likes Watch on YouTube ↗
Hello ROS Developers!
In today's video we are going to see how to use remap in a launch file.
For that we are going to use Robot Ignite Academy, which is available at http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/
But before we start, if you are new to ROS and want to Learn ROS Fast, I recommend you to take any of the following courses on Robot Ignite Academy:
ROS Basics In 5 Days (Python) - http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/ros-basics-in-5-days/
ROS Basics In 5 Days (C++) - http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/ros-courses-ros-basics-in-5-days-c/
By following the video you will see that to create a package, we have used the following command:
catkin_create_pkg tutorial rospy
Then we have created a file called publisher.py and we have given execute permission with:
chmod +x publisher.py
The code of publisher.py is the following:
#! /usr/bin/env python
import rospy
from std_msgs.msg import String
pub = rospy.Publisher('topic_name', String, queue_size=10)
rospy.init_node('node_name')
r = rospy.Rate(10) # 10hz
while not rospy.is_shutdown():
pub.publish("hello world")
r.sleep()
After that we have created a file remap_demo.launch and launched it with:
roslaunch tutorial remap_demo.launch
For explanation about the codes shown here, please watch the video.
Whether you like the video or not, please leave a comment on the comments section below, so we can interact and learn from each other.
In today's video we are going to see how to use remap in a launch file.
For that we are going to use Robot Ignite Academy, which is available at http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/
But before we start, if you are new to ROS and want to Learn ROS Fast, I recommend you to take any of the following courses on Robot Ignite Academy:
ROS Basics In 5 Days (Python) - http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/ros-basics-in-5-days/
ROS Basics In 5 Days (C++) - http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/ros-courses-ros-basics-in-5-days-c/
By following the video you will see that to create a package, we have used the following command:
catkin_create_pkg tutorial rospy
Then we have created a file called publisher.py and we have given execute permission with:
chmod +x publisher.py
The code of publisher.py is the following:
#! /usr/bin/env python
import rospy
from std_msgs.msg import String
pub = rospy.Publisher('topic_name', String, queue_size=10)
rospy.init_node('node_name')
r = rospy.Rate(10) # 10hz
while not rospy.is_shutdown():
pub.publish("hello world")
r.sleep()
After that we have created a file remap_demo.launch and launched it with:
roslaunch tutorial remap_demo.launch
For explanation about the codes shown here, please watch the video.
Whether you like the video or not, please leave a comment on the comments section below, so we can interact and learn from each other.
Category (YouTube): Science & Technology
Playback is via YouTube's official embedded player. Data from YouTube; Exumo is not affiliated with YouTube.