fork(5) download
  1. #include <iostream>
  2. #include <Eigen/Core>
  3. using namespace std;
  4.  
  5. Eigen::Matrix4f computeGripperPoseMcKee(const Eigen::Vector3f boxLocation_tool, const Eigen::Vector3f &boxDimensions, const int gripperType, const Eigen::Vector3f &gripperDimensions, const double robotLeftWall, const double trailerWidth)
  6. {
  7. const int kWidth = 0;
  8. const int kHeight = 1;
  9. const int kDepth = 2;
  10.  
  11. Eigen::Vector3f grip_ofst = Eigen::Vector3f(0, 0, 0);
  12.  
  13. //3: PR[13:UL/Pick] = PR[13:UL/Pick] - PR[13:UL/Pick] ;
  14. Eigen::Vector3f pickPosition = Eigen::Vector3f(0, 0, 0);
  15.  
  16. /*
  17. 4: --eg: ;
  18. 5: !pick middle when boxW >gripW ;
  19. 6: IF (PR[51,2:Box1_Dims_HWDCW] >= R[91:Gripper_Width]), PR[34,2:GRIP_OFST] = (PR[51,2:Box1_Dims_HWDCW] / ( -2 )) ; */
  20.  
  21. if(boxDimensions(kWidth) >= gripperDimensions(kWidth))
  22. grip_ofst(kWidth) = boxDimensions(kWidth) / ( - 2.0 );
  23.  
  24. /*
  25. 8: !align left when boxW <gripW ;
  26. 9: !use percetion top right ;
  27. 10: IF ( PR[51,2:Box1_Dims_HWDCW] < R[91:Gripper_Width] AND PR[41,2:Box1_Location] + PR[51,2:Box1_Dims_HWDCW] < R[80:Robot_Left_Wall] + 100 ), PR[34,2:GRIP_OFST] = ( R[91:Gripper_Width] / 2 - PR[51,2:Box1_Dims_HWDCW] + 0 ) ;
  28. */
  29.  
  30. if( boxDimensions(kWidth) < gripperDimensions(kWidth) && (boxLocation_tool.y() + boxDimensions(kWidth)) < robotLeftWall + 100)
  31. grip_ofst(kWidth) = ((gripperDimensions(kWidth) / 2.0) - boxDimensions(kWidth) + 0);
  32.  
  33. /*
  34. --eg: ;
  35. 12: !align right when boxW <gripW &RW ;
  36. 13: !use percetion top right ;
  37. 14: IF (PR[51,2:Box1_Dims_HWDCW] < R[91:Gripper_Width] AND PR[41,2:Box1_Location] + PR[51,2:Box1_Dims_HWDCW] <= R[80:Robot_Left_Wall] - R[81:Trailer_Width] + R[91:Gripper_Width]), PR[34,2:GRIP_OFST] = (R[91:Gripper_Width] / ( -2 )) ;
  38. */
  39.  
  40. if( boxDimensions(kWidth) < gripperDimensions(kWidth) && (boxLocation_tool.y() + boxDimensions(kWidth) <= robotLeftWall - trailerWidth + gripperDimensions(kWidth) ))
  41. grip_ofst(kWidth) = gripperDimensions(kWidth) / - 2.0;
  42.  
  43. /*
  44. 15: --eg: ;
  45. 16: JMP LBL[R[90]] ;
  46.  
  47. 17: --eg: ;
  48. 18: LBL[1:HandType1] ;
  49.   19: PR[34,1:GRIP_OFST] = R[92:Gripper_Length] ;
  50.   20: PR[34,3:GRIP_OFST]= 0 ;
  51.   21: PR[13,5:UL/Pick] = ( -90 ) ;
  52. */
  53.  
  54. if(gripperType == BoxGripper::GRIPPER_TYPE_1)
  55. {
  56. grip_ofset(
  57. }
  58.  
  59.  
  60. }
  61.  
  62.  
  63. int main() {
  64. // your code goes here
  65. return 0;
  66. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:22: fatal error: Eigen/Core: No such file or directory
 #include <Eigen/Core>
                      ^
compilation terminated.
stdout
Standard output is empty