Closed JeroenDM closed 7 years ago
I realize that I did make a trivial mistake, as predicted. I tried to call a c++ function using the dot operator. (I started learning ROS using python scripting...) I will use the double colon (::) operator, read more tutorials on virtual objects and pointers (that's where the Ptr comes from!) and then everything should work just fine.
Instead of using the line
model.setCheckCollisions(true);
You can use the following line:
model->setCheckCollisions(true);
This has to do with the 'model' object being a pointer. I still have to look into the details myself, however.
After finishing the basic tutorial I wanted to enable collision checking. In the decartes_moveit docs I found the isInCollision boolean, but it seems that the setCollisionCheck() method is not yet implemented as metioned on line 107 in the file moveit_state_adapter.h.
In decartes_core, the RobotModel class has a setCheckCollisions() method (mention the naming difference with setCollisionCheck) When I try to add the following line to the tutorial1.cpp file
model.setCheckCollisions(true);
I get a compilation error when building (with catkin_make).I tried adding this line before and after the initialize(...) is called in the tutorial code:
model.setCheckCollisions(true); // before
if (!model->initialize(robot_description, group_name, world_frame, tcp_frame))
{
ROS_INFO("Could not initialize robot model");
return -1;
}
// model.setCheckCollisions(true); // or after
I also don't understand where the Ptr comes from at the end of the descartes_core::RobotModelPtr used in the tutorial code. I'm using the indigo-devel branch, maybe the problem is related to differences between the branches..
Please forgive me for possibly making trivial mistakes, I'm relatively new to the ros universe.