Where can I find an coding example using the IR sensors for obstacle avoidance ? #47
-
Hi, Where can I find an coding example using the IR sensors for obstacle avoidance ? The goal is Create3 following a ROS2 Bag recorded action with a second ROS2 node avoiding obstacles .. returning to the recorded path to avoid the obstacle and return to the recorded path in the bag file after the obstacle has been avoided. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
We don't have an example using IR sensors for obstacle avoidance, but in the create3_sim we use IR sensors for wall follow so you can get a sense of how the datatype is used: |
Beta Was this translation helpful? Give feedback.
We don't have an example using IR sensors for obstacle avoidance, but in the create3_sim we use IR sensors for wall follow so you can get a sense of how the datatype is used:
https://github.com/iRobotEducation/create3_sim/blob/7fc5109dbe2550a7144335d00d20370a96acad9f/irobot_create_common/irobot_create_nodes/src/motion_control/wall_follow_states.cpp#L146
Note, the simulator is not accurately simulating the raw sensor data. The IR sensor is an analog sensor that will have a very different scale depending on the reflectivity of the surface (ex: a white surface will give a much higher analog value than a dark surface). Hopefully that is enough to get you started