Cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply a pose to gun by .Net API

Valued Contributor
Valued Contributor

gun_pose.png

A gun has four poses as show above, Is there a way to apply one of these poses to the gun? 

Thanks in advance for any reply.

 

Best regards,

KX

 

2 REPLIES

Re: How to apply a pose to gun by .Net API

Phenom
Phenom

Hello @kx

 

The following code is used to apply poses to a robot, but I checked that TxGun objects have the same methods required:

 

TxPose homePose = robot.GetPoseByName("HOME");
ITxDevice robotDevice = robot as ITxDevice;
robotDevice.CurrentPose = homePose.PoseData;

Can you check if it works for you?

 

 

Re: How to apply a pose to gun by .Net API

Valued Contributor
Valued Contributor

Thanks @FredCastro, you solution works very well.

Best regards,

KX