Directly index only X coordinate of a Pose variable

Hi,

I would like to know if is it normal that I can’t use directly the coordinate of a pose If I affect it in a variable example :

var_1=Waypoint_1[0] → It returns all the coordinate of the waypoint.

If i want to take only the X coordinate of waypoint 1, I need to do :

var_1=Waypoint_1
var_2=var_1[0]

Is there no other way to use only the first example ?

Thanks

1 Like

Hello Charles,
I’m not sure why you would be getting that as our robot does allow for indexing in the way described by your first example. I just tested it on the simulator and it works as intended:

MoveJ

  • Waypoint_1
  • Waypoint_2
  • var1 = Waypoint_1[0] //result of var1 is indeed the x value of Waypoint_1

Are you doing this in Polyscope (our GUI)? Or trying to accomplish this through external communication?

Hi,

I’m doing this on the simulator (3.8).

And my result of var_1=Waypoint[0] is not the value of X, I don’t know if i’m doing something wrong or not;

see the picture attached :

Hello Charles,
I was able to reproduce the same results as you found in CB3 3.8.

Suggested solution to your problem:
To work around the issue, try Assigning the position to a temporary variable (var_pose below) and then taking the X coordinate from that instead.

 Please let us know if you have any questions.

I am seeing same behaviour in 3.8, but none of the previous versions of CB3 software or the e-Series 5.x releases will let me address a waypoint directly in this way, which makes me think it is unintentional. @dsh can you elaborate on what you did and in what version?

@ajp I used the online simulator version 5.1.1. It appeared to work for me. Due to the holidays I won’t be in the office until Wednesday but I can check on several of our robots then and verify actual use.

2 Likes