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

Add ability to corrupt/break sensors #262

Open
tylerlum opened this issue Oct 23, 2021 · 0 comments · May be fixed by #264
Open

Add ability to corrupt/break sensors #262

tylerlum opened this issue Oct 23, 2021 · 0 comments · May be fixed by #264
Assignees

Comments

@tylerlum
Copy link
Contributor

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>
@jamenkaye jamenkaye self-assigned this Oct 25, 2021
@jamenkaye jamenkaye linked a pull request Nov 20, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants