Browse Source

Fixed indentation issue in example_5 markdown file.

noetic
Alan G. Sanchez 2 years ago
parent
commit
893ee94fd8
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      example_5.md

+ 2
- 2
example_5.md View File

@ -123,8 +123,8 @@ for joint in joints:
index = self.joint_states.name.index('joint_arm_l0') index = self.joint_states.name.index('joint_arm_l0')
joint_positions.append(4*self.joint_states.position[index]) joint_positions.append(4*self.joint_states.position[index])
continue continue
index = self.joint_states.name.index(joint)
joint_positions.append(self.joint_states.position[index])
index = self.joint_states.name.index(joint)
joint_positions.append(self.joint_states.position[index])
``` ```
In this section of the code, a forloop is used to parse the names of the requested joints from the *self.joint_states* list. The `index()` function returns the index a of the name of the requested joint and appends the respective position to our *joint_positions* list. In this section of the code, a forloop is used to parse the names of the requested joints from the *self.joint_states* list. The `index()` function returns the index a of the name of the requested joint and appends the respective position to our *joint_positions* list.

Loading…
Cancel
Save