I have an iRobot Create 2 and am currently using the create_autonomy package. Currently, they have cliff sensors as a "planned" feature. I see in the documentation that there are 4 cliff sensors (which can return 0 (no cliff) and 1 (yes cliff)) and their "Packet ID" numbers.

It also mentions this note for each sensor: "NOTE: This packet is a binary version of the “Cliff Front Left Signal” (ID: 29) packet." I don't understand what this means or if it's relevant to what I'm doing.

How can I read this cliff sensor data (in order to publish a topic with it)?


1 Answer 1


It is possible to subscribe to the cliff state using ROS. The topic is /cliff_state, and it is of type Int16. Below is what I used in my code, where callback_cliff is my callback function.

rospy.Subscriber('/cliff_state', Int16, callback_cliff)

However, I'm still not sure what the packet ID numbers are.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.