Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

Add ability to corrupt/break sensors #262

@tylerlum

Description

@tylerlum

Modify MOCK_sensors.py so that we can easily break a sensor so we can validate our performance with a broken sensor in real testing.

Involves 4 files to change:
MOCK_sensors.py
Look for

self.publisher.publish(data)

Then above, modify data conditionally on parameters. (one for each sensor)
Something like

        if rospy.get_param('corrupt_w', default=False):
            rospy.logwarn("MOCK sensors publishing broken wind sensor")
            data.wind_sensor_1_angle_degrees = 0

Other things are launch files. Main thing to change in in MOCK_sensors.launch
Follow this as an example:

    <!-- Sets if changes in heading and speed should be smooth or not -->
    <arg name="smooth_changes" default="true" />
    <param name="smooth_changes" type="bool" value="$(arg smooth_changes)" />

Also need to modify all.launch and launch_all_mocks.launch, as they "pass in parameters" to each other
Eg.

    <arg name="sensor_noise" default="false" />
    <include file="$(find local_pathfinding)/launch/launch_all_mocks.launch">
...
      <arg name="sensor_noise" value="$(arg sensor_noise)" />
...
    </include>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions