Skip to content

Commit

Permalink
refactor(dummy_perception_publisher): rework parameters
Browse files Browse the repository at this point in the history
Signed-off-by: batuhanbeytekin <[email protected]>
refactor(dummy_perception_publisher): rework parameters

Signed-off-by: batuhanbeytekin <[email protected]>
  • Loading branch information
batuhanbeytekin committed Sep 19, 2024
1 parent 29f4e99 commit 9585c55
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion simulator/dummy_perception_publisher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This node publishes the result of the dummy detection with the type of perceptio

## Parameters

{{json_to_markdown("simulator/dummy_perception_publisher/schema/dummy_perception_publisher.schema.json)}}
{{json_to_markdown("simulator/dummy_perception_publisher/schema/dummy_perception_publisher.schema.json")}}

### Node Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"detection_successful_rate": {
"type": "number",
"default": 0.8,
"description": "sensor detection rate. (min) 0.0 - 1.0(max)"
"minimum": 0.0,
"maximum": 1.0,
"description": "sensor detection rate."
},
"enable_ray_tracing": {
"type": "boolean",
Expand Down
18 changes: 9 additions & 9 deletions simulator/dummy_perception_publisher/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,17 @@ TrackedObject ObjectInfo::toTrackedObject(
DummyPerceptionPublisherNode::DummyPerceptionPublisherNode()
: Node("dummy_perception_publisher"), tf_buffer_(this->get_clock()), tf_listener_(tf_buffer_)
{
visible_range_ = this->declare_parameter("visible_range", 100.0);
detection_successful_rate_ = this->declare_parameter("detection_successful_rate", 0.8);
enable_ray_tracing_ = this->declare_parameter("enable_ray_tracing", true);
use_object_recognition_ = this->declare_parameter("use_object_recognition", true);
use_base_link_z_ = this->declare_parameter("use_base_link_z", true);
visible_range_ = this->declare_parameter("visible_range");
detection_successful_rate_ = this->declare_parameter("detection_successful_rate");
enable_ray_tracing_ = this->declare_parameter("enable_ray_tracing");
use_object_recognition_ = this->declare_parameter("use_object_recognition");
use_base_link_z_ = this->declare_parameter("use_base_link_z");
const bool object_centric_pointcloud =
this->declare_parameter("object_centric_pointcloud", false);
publish_ground_truth_objects_ = this->declare_parameter("publish_ground_truth", false);
this->declare_parameter("object_centric_pointcloud");
publish_ground_truth_objects_ = this->declare_parameter("publish_ground_truth");
const unsigned int random_seed =
static_cast<unsigned int>(this->declare_parameter("random_seed", 0));
const bool use_fixed_random_seed = this->declare_parameter("use_fixed_random_seed", false);
static_cast<unsigned int>(this->declare_parameter("random_seed"));
const bool use_fixed_random_seed = this->declare_parameter("use_fixed_random_seed");

if (object_centric_pointcloud) {
pointcloud_creator_ =
Expand Down

0 comments on commit 9585c55

Please sign in to comment.