0
$\begingroup$

Rosanswers logo

I have a robot with an arm_navigation stack configured to use a collision map, and it works fine. However, if arm_navigation is started with no visible environment obstacles, the environment server will not complete its configuration sequence and disallow planning motions. This is the typical output:

Waiting for environment server planning scene registration service /register_planning_scene

Publishing an empty point cloud does not seem to make the environment server happy, so is there a way about this use case?. Currently I'm publishing a dummy cloud with a single point outside the workspace of my robot (a hack that works in the meantime).

Further details on what's going on: An environment server instance is not completely constructed because it gets stuck in a loop, which requires waking up this CollisionSpaceMonitor callback to break it.

Edit The problem statement can be generalized to saying that apparently the collision map is not updated when an empty point cloud is published. I'm using the collider node, and with an already configured environment server, the octomap cells are not updated if I go from an environment with obstacles to one without any.

TIA.


Originally posted by Adolfo Rodriguez T on ROS Answers with karma: 3907 on 2012-05-14

Post score: 0


Original comments

Comment by bit-pirate on 2012-05-17:
While we are still waiting for a proper solution, what about starting the environment server with "use_collision_map:=false" and then restart it with "true", once a populated collision map is available?

Comment by Adolfo Rodriguez T on 2012-05-18:
The use_collision_map parameter is read only once in the constructor of the environment server, so unfortunately that won't work.

Comment by bit-pirate on 2012-05-23:
I meant, shutting down the whole environment server and then bringing it up again. In this way the use_collision_map parameter will be read again. Maybe ros::shutdown() + the restart parameter in roslaunch could do the trick.

Comment by Adolfo Rodriguez T on 2012-05-23:
You could think of doing that. It just seems a more complicated hack than the one I already have in place, which is to publish a minimal obstacle slightly outside the reach of the robot until the environment server successfully initializes. Note that this is still a hack, though.

Comment by Adolfo Rodriguez T on 2012-05-31:
Reported as Issue 5198, so it does not get lost.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Actually, the environment server is perfectly happy to accept an empty collision map. If you build and start up this executable you should see that the environment server starts up:

#include <ros/ros.h>
#include <arm_navigation_msgs/CollisionMap.h>

int main(int argc, char** argv)
{
  ros::init(argc, argv, "empty_collision_map_publisher");
  //figuring out whether robot_description has been remapped

  ros::NodeHandle nh;

  ros::Publisher pub = nh.advertise<arm_navigation_msgs::CollisionMap>("/collision_map_occ", 1, true);

  while(ros::ok()) {
    arm_navigation_msgs::CollisionMap coll;
    coll.header.frame_id = "odom_combined";
    coll.header.stamp = ros::Time::now();
    pub.publish(coll);
  }

  return 0;
}

The issue is that there are checks in collider.cpp to only publish if there are some occupied points (check out the first line of the publishCollisionMap function). One option is to add a parameter to collider that will cause it to publish even if there are no points - if this is acceptable I'll add it in and release arm_navigation_experimental.


Originally posted by egiljones with karma: 2031 on 2012-06-08

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Adolfo Rodriguez T on 2012-06-10:
That is indeed acceptable. I've updated the relevant ticket with your answer, and a patch.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.