This is the virtual sensor package to be included in the src file if you want fake cone detection and mapping data
Copy and paste this entire folder under src file of the autonomous repo
1: Go to virtual_sensor/virtual_sensor/publisher_member_function.py 2: Find line 43, change the path to the path of "TESTDATA.txt" in your computer. For me, it is the one shown below. But for you it depends on how you arrange your files. If you are using docker, make sure that you use the directory that is under the docker container (for example: /ws/src/....)
1: colcon build 2: run: ros2 run virtual_sensor talker You should be able to see bunch of message popping out like this
3: run: ros2 run cone_mapping listener You should be able to see the terminal that you running cone_mapping node showing up bunch of "Listened" like this
1: Go to virtual_sensor/virtual_sensor/Testcase_Generation
2: Open testcase_generator_track.py
3: If you want to customize your track, you can change the following parameters (don't change anything else, you should not need to).
4: Click Run to generate tracks. You should be able to see the following when it is running
5: You should have your test data stored in a txt file, before you replace this file to TESTDATA.txt that is stored in the parent folder, please ensure that you delete these sections. Your TESTDATA.txt should look like this: (I will update the program to automatically remove these sections for you) Note:
- Change radius to larger radius if you want you track to be more flat (Use large number to simulate a straight track
- Change file_name if you want your test data being stored in a txt file with a different name.