...
POST No. 2591797
pick and place 예제코드 질문입니다.
2022-02-17 15:24:39 n163663707802425

pick and place 예제코드를 하나하나 보고 있는 중에 궁금한 것이 있어서 질문을 드립니다.

혹시 마지막에 있는 메인함수 부분은 밑에 있는 것 처럼 구성이 되어 있습니다.

 

int main(int argc, char **argv)

{

  // Init ROS node

  ros::init(argc, argv, "open_manipulator_pick_and_place");

  ros::NodeHandle node_handle("");

 

  OpenManipulatorPickandPlace open_manipulator_pick_and_place;

 

  ros::Timer publish_timer = node_handle.createTimer(ros::Duration(0.100)/*100ms*/, &OpenManipulatorPickandPlace::publishCallback, &open_manipulator_pick_and_place);

 

  while (ros::ok())

  {

    ros::spinOnce();

  }

  return 0;

}

 

이 부분에서

OpenManipulatorPickandPlace open_manipulator_pick_and_place; 이 명령어가 잘 이해가 가지 않습니다. 

 

이 명령어는 무엇을 의미하는 건지 알려주실 수 있으신가요?

2022-02-17 15:24:39
n163663707802425
2022-02-18 13:07:24 김보경

안녕하세요.

 

OpenManipulatorPickandPlace open_manipulator_pick_and_place; ​ 구문은 

OpenManipulatorPickandPlace 클래스를 open_manipulator_pick_and_place로 선언하는 것 입니다.

C++ 클래스 선언 부분을 살펴보시면 더 정확한 정보를 확인하실 수 있습니다.


감사합니다.

2022-02-18 13:07:24
rlaqhrud852