[ROS in 5 mins] 046 - What is ROS Namespace
The Construct Robotics Institute 5:28
2,783 views · 35 likes Watch on YouTube ↗
Hello Everyone
In today's video we're going to see what is ROS Namespace and how it works.
For that we're going to use Robot Ignite Academy, which is the best tool if you want Learn ROS Fast: http://bit.ly/2Oc2pJK
Before we start, if you are new to ROS, I highly recommend you to take any of the following courses on Robot Ignite Academy:
▸ ROS Basics In 5 Days (Python) - http://bit.ly/2Ob4J3J
▸ ROS Basics In 5 Days (C++) - http://bit.ly/2Obn80y
The commands used during the video to create the package were the following:
cd ~/catkin_ws/src/
catkin_create_pkg tutorial rospy geometry_msgs
cd tutorial/src/
touch robot.py
chmod +x robot.py
source ~/catkin_ws/devel/setup.bash
The content of robot.py was:
#! /usr/bin/env python
import rospy
from geometry_msgs.msg import Pose
rospy.init_node('robot', anonymous=True)
pub = rospy.Publisher('my_position', Pose, queue_size=1)
rate = rospy.Rate(1) # 1hz
while not rospy.is_shutdown():
pub.publish(Pose())
rate.sleep()
Then the following commands were used to run our publisher and list our topics:
rosrun tutorial robot.py __ns:=robot1
rosrun tutorial robot.py __ns:=robot2
rostopic list | grep my_pos
We love feedback, so, whether you like the video or not, please share your thoughts on the comments section below.
Thanks for watching.
In today's video we're going to see what is ROS Namespace and how it works.
For that we're going to use Robot Ignite Academy, which is the best tool if you want Learn ROS Fast: http://bit.ly/2Oc2pJK
Before we start, if you are new to ROS, I highly recommend you to take any of the following courses on Robot Ignite Academy:
▸ ROS Basics In 5 Days (Python) - http://bit.ly/2Ob4J3J
▸ ROS Basics In 5 Days (C++) - http://bit.ly/2Obn80y
The commands used during the video to create the package were the following:
cd ~/catkin_ws/src/
catkin_create_pkg tutorial rospy geometry_msgs
cd tutorial/src/
touch robot.py
chmod +x robot.py
source ~/catkin_ws/devel/setup.bash
The content of robot.py was:
#! /usr/bin/env python
import rospy
from geometry_msgs.msg import Pose
rospy.init_node('robot', anonymous=True)
pub = rospy.Publisher('my_position', Pose, queue_size=1)
rate = rospy.Rate(1) # 1hz
while not rospy.is_shutdown():
pub.publish(Pose())
rate.sleep()
Then the following commands were used to run our publisher and list our topics:
rosrun tutorial robot.py __ns:=robot1
rosrun tutorial robot.py __ns:=robot2
rostopic list | grep my_pos
We love feedback, so, whether you like the video or not, please share your thoughts on the comments section below.
Thanks for watching.
Category (YouTube): Science & Technology
Playback is via YouTube's official embedded player. Data from YouTube; Exumo is not affiliated with YouTube.