0
$\begingroup$

Rosanswers logo

Hallo

I want to define custom value for for the costmap.

In costmap2D API there are 4 special values:

static const unsigned char NO_INFORMATION = 255;

static const unsigned char LETHAL_OBSTACLE = 254;

static const unsigned char INSCRIBED_INFLATED_OBSTACLE = 253;

static const unsigned char FREE_SPACE = 0;

How can i define my particular costmap value ?

thanks


Originally posted by Developer on ROS Answers with karma: 69 on 2018-03-08

Post score: 0


Original comments

Comment by David Lu on 2018-03-09:
There's nothing stopping you from saying const unsigned char FOO=42 but I have the feeling you mean something deeper. What do you want that value to do?

Comment by Developer on 2018-03-09:
yes you are right,case is deeper.I want to integrate/use that custom value in the global path planner. Global path planner should create ways on this new defined const unsigned char.The Question is: is it possible and which files should be manipulated?(except costvalues.p, costmap_2d_publisher.cpp )

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You have to do two separate things:

  1. You have to get the value into the costmap (if it is not already in the costmap). You could start here
  2. You have to get the global planner to see the value and act differently because of it. That's a semi-complex operation, but I would look here to start.

Originally posted by David Lu with karma: 10932 on 2018-03-09

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Developer on 2018-03-10:
Thank you for the valuable answer

Comment by David Lu on 2018-03-10:
please hit the checkmark to the left

Comment by curi_ROS on 2019-03-19:
Is there a way to do this to create "virtual preferred paths"?

Comment by David Lu on 2019-03-19:
Please open your own question with more context.

$\endgroup$

Your Answer

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