tesseract-robotics / tesseract_ros_workcell

11 stars 6 forks source link

Failed to get monitor environment information #2

Closed VictorLamoine closed 3 years ago

VictorLamoine commented 3 years ago

I am trying to run the application from the feature/CommandLanguage branch:

... logging to /home/victor/.ros/log/dbaebe38-150e-11eb-b072-34e6d766b009/roslaunch-victor-m4800-6576.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://victor-m4800:42137/

SUMMARY
========

PARAMETERS
 * /application_node/tool_path: /home/victor/ros_...
 * /robot_description: <?xml version="1....
 * /robot_description_semantic: <robot name="tess...
 * /rosdistro: melodic
 * /rosversion: 1.14.9
 * /tesseract_contact_monitoring/monitor_namespace: tesseract_workcel...
 * /tesseract_contact_monitoring/monitored_namespace: tesseract_workcel...
 * /tesseract_contact_monitoring/publish_environment: True
 * /tesseract_contact_monitoring/publish_markers: True
 * /tesseract_environment_monitor/continuous_plugin: BulletCastBVHManager
 * /tesseract_environment_monitor/discrete_plugin: BulletDiscreteBVH...
 * /tesseract_environment_monitor/joint_state_topic: 
 * /tesseract_environment_monitor/monitor_namespace: tesseract_workcel...
 * /tesseract_environment_monitor/publish_environment: True
 * /tesseract_environment_monitor/robot_description: robot_description
 * /twc_planning_server/continuous_plugin: BulletCastBVHManager
 * /twc_planning_server/discrete_plugin: BulletDiscreteBVH...
 * /twc_planning_server/monitor_namespace: tesseract_workcel...
 * /twc_planning_server/monitored_namespace: tesseract_workcel...
 * /twc_planning_server/robot_description: robot_description

NODES
  /
    application_node (twc_application/twc_application_node)
    joint_state_publisher (joint_state_publisher/joint_state_publisher)
    rviz (rviz/rviz)
    tesseract_contact_monitoring (tesseract_monitoring/tesseract_monitoring_contacts_node)
    tesseract_environment_monitor (tesseract_monitoring/tesseract_monitoring_environment_node)
    twc_planning_server (twc_motion_planning/twc_motion_planning_planning_server_node)

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

setting /run_id to dbaebe38-150e-11eb-b072-34e6d766b009
process[rosout-1]: started with pid [6600]
started core service [/rosout]
process[tesseract_environment_monitor-2]: started with pid [6607]
process[twc_planning_server-3]: started with pid [6608]
process[tesseract_contact_monitoring-4]: started with pid [6609]
process[rviz-5]: started with pid [6610]
process[application_node-6]: started with pid [6611]
process[joint_state_publisher-7]: started with pid [6612]
[ INFO] [1603443913.831925316]: rviz version 1.13.13
[ INFO] [1603443913.831964767]: compiled against Qt version 5.9.5
[ INFO] [1603443913.831987157]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1603443913.842524728]: Forcing OpenGl version 0.
[ERROR] [1603443913.887758493]: Failed to get monitor environment information!
================================================================================REQUIRED process [application_node-6] has died!
process has died [pid 6611, exit code -11, cmd /home/victor/ros_ws/devel/lib/twc_application/twc_application_node __name:=application_node __log:=/home/victor/.ros/log/dbaebe38-150e-11eb-b072-34e6d766b009/application_node-6.log].
log file: /home/victor/.ros/log/dbaebe38-150e-11eb-b072-34e6d766b009/application_node-6*.log
Initiating shutdown!
================================================================================
[joint_state_publisher-7] killing on exit
[application_node-6] killing on exit
[rviz-5] killing on exit
[tesseract_contact_monitoring-4] killing on exit
[twc_planning_server-3] killing on exit
[tesseract_environment_monitor-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Here are details about my workspace:

$ for i in */.git ;do (cd $i/..; echo -e "\e[34m$(pwd)\e[39m"; git log --oneline | head -n1; git remote -v;git branch; echo -e ''); done

/home/victor/ros_ws/src/cmake_common_scripts
15450c2 Fix cppcheck, clang-tidy, iwyu ARGUMENTS which should be a muli value argument
origin  https://github.com/ros-industrial/cmake_common_scripts.git (fetch)
origin  https://github.com/ros-industrial/cmake_common_scripts.git (push)
* master

/home/victor/ros_ws/src/descartes_light
6924e91 Fix visibility control for each target
origin  https://github.com/swri-robotics/descartes_light.git (fetch)
origin  https://github.com/swri-robotics/descartes_light.git (push)
* feature/CommandLanguage
  master

/home/victor/ros_ws/src/ifopt
4732b0c Changes to support windows build (#65)
origin  https://github.com/ethz-adrl/ifopt.git (fetch)
origin  https://github.com/ethz-adrl/ifopt.git (push)
* master

/home/victor/ros_ws/src/opw_kinematics
fd62f36 Update CI build and add badges to readme
origin  https://github.com/Jmeyer1292/opw_kinematics.git (fetch)
origin  https://github.com/Jmeyer1292/opw_kinematics.git (push)
* master

/home/victor/ros_ws/src/tesseract
656506d41 Fix to handle console_bridge target renaming in noetic
origin  https://github.com/ros-industrial-consortium/tesseract.git (fetch)
origin  https://github.com/ros-industrial-consortium/tesseract.git (push)
* feature/CommandLanguage
  master

/home/victor/ros_ws/src/tesseract_ext
b6d008e Enable Bullet Extras (#28)
origin  https://github.com/ros-industrial-consortium/tesseract_ext.git (fetch)
origin  https://github.com/ros-industrial-consortium/tesseract_ext.git (push)
* master

/home/victor/ros_ws/src/tesseract_ros
0af34c78 Implement plotToolPath for ROSPlotting
origin  https://github.com/ros-industrial-consortium/tesseract_ros.git (fetch)
origin  https://github.com/ros-industrial-consortium/tesseract_ros.git (push)
* feature/CommandLanguage
  master

/home/victor/ros_ws/src/tesseract_ros_workcell
b566efa Modify to plan with descartes and pass as a seed to trajopt
origin  https://github.com/Levi-Armstrong/tesseract_ros_workcell.git (fetch)
origin  https://github.com/Levi-Armstrong/tesseract_ros_workcell.git (push)
* feature/CommandLanguage
  master

/home/victor/ros_ws/src/trajopt
95781ba Add windows support stage 1
origin  https://github.com/ros-industrial-consortium/trajopt_ros.git (fetch)
origin  https://github.com/ros-industrial-consortium/trajopt_ros.git (push)
* feature/CommandLanguage
  master

What is wrong?

Levi-Armstrong commented 3 years ago

I will take a look tonight and make sure things are working on my machine since we recently merged changes into both tesseract and tesseracr_ros. It looks like this node failed to retrieve environment changes from the tesseract environment monitor in the launch file.

Levi-Armstrong commented 3 years ago

The branches look good. I just tested going through the steps below and everthing seems to work.

  1. roslaunch twc_application application.launch rviz:=true
  2. wait for the visualization to full load in rviz
  3. rosrun twc_application twc_application_node
  4. In the terminal it will pause and ask you to hit enter to continue. This is so you can see the transition through the different step. The first set of cartesian poses are what were provided to the planner. Then after hitting enter the first time it will send those instructions to the planner and after it finishes it will ask you to hit enter again. Then you should see the trajectory followed by the planner. Then hit enter again and you will see the trajectory play using the actual time parameterized data.
Levi-Armstrong commented 3 years ago

I was just able to recreate the error you received by launching everything by passing application:=true. I am working on a fix in the new TesseractMonitorInterface providing a method that you can call to wait until data is be provided from the desired monitor. If yo use the procedure above you should not have any issues.

Levi-Armstrong commented 3 years ago

I have fixed it in PR

Then in the twc_application application_node.cpp add the following under the creation of the TesseractMonitorInterface

interface.addNamespace("tesseract_workcell_environment");
if (!interface.wait())
{
  ROS_ERROR("The monitor namespace 'tesseract_workcell_environment' is not avialable!");
  return 0;
}
Levi-Armstrong commented 3 years ago

@VictorLamoine Everything as been merged so if you pull the latest changes from tesseract, tesseract_ros and tesseract_ros_workcell it will now run using the command bellow.

roslaunch twc_application application.launch rviz:=true application:=true
VictorLamoine commented 3 years ago

Hi Levi, everything works now! Thanks a lot for sorting this out :+1:

Levi-Armstrong commented 3 years ago

Great. There are two other option in the code, a freespace, and a raster which you can switch between by commenting out the others. I will work on making it easier to switch via launch file. Just a note, the raster planners expect a specific program layout, which is only documented in the headers for the planners. Here is some documentation on the command language