Skip to content

PTU totally off when exceeding limit #87

@lucasb-eyer

Description

@lucasb-eyer

You can test by doing the following; note that position is in radians:

rostopic pub --once /ptu/cmd sensor_msgs/JointState "header:
  seq: 0
  stamp: {secs: 0, nsecs: 0}
  frame_id: ''
name: ['tilt', 'pan']
position: [0, 0]
velocity: [0.6, 0.6]
effort: [1, 1]"

This moves it to what it thinks is 0,0. Now, make it rotate more than it can:

rostopic pub --once /ptu/cmd sensor_msgs/JointState "header:
  seq: 0
  stamp: {secs: 0, nsecs: 0}
  frame_id: ''
name: ['tilt', 'pan']
position: [0, 4]
velocity: [0.6, 0.6]
effort: [1, 1]"

4 Radians is more than 180deg, so it will hardware-block at around 181deg. Now, go back to 0:

rostopic pub --once /ptu/cmd sensor_msgs/JointState "header:
  seq: 0
  stamp: {secs: 0, nsecs: 0}
  frame_id: ''
name: ['tilt', 'pan']
position: [0, 0]
velocity: [0.6, 0.6]
effort: [1, 1]"

As you will notice, it goes far beyond what previously was 0. Exactly so much more than what it couldn't rotate in the 4 step:

rostopic pub --once /ptu/cmd sensor_msgs/JointState "header:
  seq: 0
  stamp: {secs: 0, nsecs: 0}
  frame_id: ''
name: ['tilt', 'pan']
position: [0, 0.8585]
velocity: [0.6, 0.6]
effort: [1, 1]"

Don't have the time to fix this now though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions