ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Is it possible to configure environment server with empty collision map?

asked 2012-05-14 05:44:11 -0500

Adolfo Rodriguez T gravatar image

updated 2012-05-15 06:21:45 -0500

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.

edit retag flag offensive close merge delete

Comments

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?

bit-pirate gravatar image bit-pirate  ( 2012-05-17 13:39:41 -0500 )edit

The use_collision_map parameter is read only once in the constructor of the environment server, so unfortunately that won't work.

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2012-05-18 03:45:53 -0500 )edit

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.

bit-pirate gravatar image bit-pirate  ( 2012-05-23 13:27:12 -0500 )edit

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.

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2012-05-23 21:26:20 -0500 )edit

Reported as Issue 5198, so it does not get lost.

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2012-05-31 01:50:27 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-06-08 09:04:50 -0500

egiljones gravatar image

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.

edit flag offensive delete link more

Comments

That is indeed acceptable. I've updated the relevant ticket with your answer, and a patch.

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2012-06-10 21:35:36 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2012-05-14 05:44:11 -0500

Seen: 589 times

Last updated: Jun 08 '12