Skip to main content
make the title shorter
Link
ravi
  • 1.4k
  • 2
  • 5
  • 11

Queries on ROS 2 Humble tutorial

deleted 16 characters in body; edited tags; edited title
Source Link
ravi
  • 1.4k
  • 2
  • 5
  • 11

Couple of queries Queries on ros2 humbleROS 2 Humble tutorial of "Writing a simple publisher and subscriber (Python)"

I am a beginner, and I am following the ros2ROS 2 tutorial. I have a couple of questions about this tutorial: https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.htmlthis tutorial

Q1: In line 1, we import rclpy, so why do we need to import Node separately in line 2?

Q2: In line 9, we write self as the argument of init function. Can we write anything else instead of self? For example, can we define the function as: def init(us):?

Q3: In line 10, we give the name minimal_publisher. Can I write anything else instead of minimal_publisher in line 27? Can I write in line 27: test_minimal_publisher = MinimalPublisher()

Q4: What will be the name of our node? Is it MinimalPublisher or minimum_publisher?

  • Q1: In line 1, we import rclpy, so why do we need to import Node separately in line 2?
  • Q2: In line 9, we write self as the argument of __init__ function. Can we write anything else instead of self? For example, can we define the function as: def __init__(us):?
  • Q3: In line 10, we give the name minimal_publisher. Can I write anything else instead of minimal_publisher in line 27? Can I write in line 27: test_minimal_publisher = MinimalPublisher()
  • Q4: What will be the name of our node? Is it MinimalPublisher or minimum_publisher?

Thank you for your time.

enter image description here

Couple of queries on ros2 humble tutorial of "Writing a simple publisher and subscriber (Python)"

I am a beginner, and I am following the ros2 tutorial. I have a couple of questions about this tutorial: https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.html

Q1: In line 1, we import rclpy, so why do we need to import Node separately in line 2?

Q2: In line 9, we write self as the argument of init function. Can we write anything else instead of self? For example, can we define the function as: def init(us):?

Q3: In line 10, we give the name minimal_publisher. Can I write anything else instead of minimal_publisher in line 27? Can I write in line 27: test_minimal_publisher = MinimalPublisher()

Q4: What will be the name of our node? Is it MinimalPublisher or minimum_publisher?

Thank you for your time.

enter image description here

Queries on ROS 2 Humble tutorial

I am a beginner, and I am following the ROS 2 tutorial. I have a couple of questions about this tutorial:

  • Q1: In line 1, we import rclpy, so why do we need to import Node separately in line 2?
  • Q2: In line 9, we write self as the argument of __init__ function. Can we write anything else instead of self? For example, can we define the function as: def __init__(us):?
  • Q3: In line 10, we give the name minimal_publisher. Can I write anything else instead of minimal_publisher in line 27? Can I write in line 27: test_minimal_publisher = MinimalPublisher()
  • Q4: What will be the name of our node? Is it MinimalPublisher or minimum_publisher?

Thank you for your time.

enter image description here

Source Link

Couple of queries on ros2 humble tutorial of "Writing a simple publisher and subscriber (Python)"

I am a beginner, and I am following the ros2 tutorial. I have a couple of questions about this tutorial: https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.html

Q1: In line 1, we import rclpy, so why do we need to import Node separately in line 2?

Q2: In line 9, we write self as the argument of init function. Can we write anything else instead of self? For example, can we define the function as: def init(us):?

Q3: In line 10, we give the name minimal_publisher. Can I write anything else instead of minimal_publisher in line 27? Can I write in line 27: test_minimal_publisher = MinimalPublisher()

Q4: What will be the name of our node? Is it MinimalPublisher or minimum_publisher?

Thank you for your time.

enter image description here