ros-industrial / industrial_training

ROS-Industrial Training Material
https://industrial-training-master.readthedocs.io
Apache License 2.0
422 stars 236 forks source link

Demo 1.5 - Build error and no directory "demo_manipulation" #171

Closed AdamSorrel closed 6 years ago

AdamSorrel commented 6 years ago

Going through the demo 1.5, I have encountered a few issues. I have adjusted my code according to the suggested 'correct result', but I was still not able to compile it, getting this error:

/home/doron/ROS/perception_driven_ws/src/collision_avoidance_pick_and_place/src/tasks/move_to_wait_position.cpp:41: 
error: cannot convert 'moveit::planning_interface::MoveItErrorCode' to 'bool' in assignment
   success = move_group_ptr->move();
           ^

I have found a solution that worked for me in the robotics.stackexchange.com, suggesting replacing bool success = move_group.move() with bool success = move_group.move() == moveit::planning_interface::MoveItErrorCode::SUCCESS.

This seemed to allow the package to build successfully. However, I might have been wrong from the get go, since I did not find the folder demo_manipulation that is mentioned in the command line build process.

_...Alternatively, in a terminal cd into the '''demomanipulation''' directory and do the following: ...

I'm not sure what that is referring to.

There is actually also a controversy around using mongo_db and the warehouse_ros in general. The python script has been removed as stated here, but it is still accessible and can be installed following this procedure. However it seems as though the required script is no longer in ros_warehouse but in ros_warehouse_mongo, which needs to be corrected in the warehouse.launch files in the package.

However even after successfully building the package, I was not able to run it with the following command after sourcing devel/setup.bash.

roslaunch collision_avoidance_pick_and_place ur5_pick_and_place.launch

The output of the run is following:

auto-starting new master
process[master]: started with pid [8713]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 93ac3bb4-f898-11e7-bed7-ac7ba10e84a4
process[rosout-1]: started with pid [8726]
started core service [/rosout]
process[pick_and_place_node-2]: started with pid [8743]
process[move_group-3]: started with pid [8744]
process[mongo_wrapper_ros_Belinda_8702_826527351988721566-4]: started with pid [8745]
[ INFO] [1515871986.220604846]: Parameters successfully read
[ERROR] [1515871986.228813541]: Robot model parameter not found! Did you remap 'robot_description'?
[FATAL] [1515871986.228922965]: Unable to construct robot model. Please make sure all needed information is on the parameter server.
terminate called after throwing an instance of 'std::runtime_error'
  what():  Unable to construct robot model. Please make sure all needed information is on the parameter server.
[ERROR] [1515871986.321557211]: Robot model parameter not found! Did you remap 'robot_description'?
[ERROR] [1515871986.321674030]: Robot model not loaded
[ERROR] [1515871986.335522047]: Planning scene not configured
[move_group-3] process has finished cleanly
log file: /home/doron/.ros/log/93ac3bb4-f898-11e7-bed7-ac7ba10e84a4/move_group-3*.log
================================================================================REQUIRED process [pick_and_place_node-2] has died!
process has died [pid 8743, exit code -6, cmd /home/doron/ROS/perception_driven_ws/devel/lib/collision_avoidance_pick_and_place/pick_and_place_node __name:=pick_and_place_node __log:=/home/doron/.ros/log/93ac3bb4-f898-11e7-bed7-ac7ba10e84a4/pick_and_place_node-2.log].
log file: /home/doron/.ros/log/93ac3bb4-f898-11e7-bed7-ac7ba10e84a4/pick_and_place_node-2*.log
Initiating shutdown!
================================================================================
[mongo_wrapper_ros_Belinda_8702_826527351988721566-4] killing on exit
[pick_and_place_node-2] killing on exit
[mongo_wrapper_ros_Belinda_8702_826527351988721566-4] escalating to SIGTERM
[mongo_wrapper_ros_Belinda_8702_826527351988721566-4] escalating to SIGKILL
[rosout-1] killing on exit
[master] killing on exit
Shutdown errors:
 * process[mongo_wrapper_ros_Belinda_8702_826527351988721566-4, pid 8745]: required SIGKILL. May still be running.
shutting down processing monitor...
... shutting down processing monitor complete
done
jrgnicho commented 6 years ago

The success variable needs to be a MoveitErrorCode type.

Furthermore, the instructions for that tutorial should indicate running a setup launch file beforehand in order to load the robot and the move group planning node.