ROSject section 4, clarification required

In 1. Create a spot recorder script. we need to save the location in a yaml file. The 3 locations to record contain a label and the pose coordinates. In a certain way this should be in a table format.

In the provided exemples there is no template of anything with a multi row table form. ( I have worked for year with ros and ros2 and haven’t seen any other exemple of yaml files except a single row matrix of exclusively the same type of values text or numbers ) In our case we have three row of mixed values types

Hi @fgenestcvdl ,

I am not sure if you can create a table-like format using yaml files.

The best way to indicate / store a reference to a pose value in a yaml file would be as shown below:

ros2_node_name:       # ros2 node name to load spots data
  ros__parameters:    # note: two underscores here!
    waypoint_label_1:
      x: 1.234        # meters
      y: 2.345        # meters
      theta: 1.5708   # radians
    waypoint_label_2:
      x: 1.234        # meters
      y: 2.345        # meters
      theta: 1.5708   # radians
    waypoint_label_3:
      x: 1.234        # meters
      y: 2.345        # meters
      theta: 1.5708   # radians

You can use Pose2D message type to store the positions in the program.

As far as I know, this is not a table form.

I hope this helps!

Regards,
Girish

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.