General Robotics with RoboScape: Robot programming with Roboscape.
General RoboScape
Learning Goals
- Learn about the various remote procedure calls (RPCs) of RoboScape
- Communicate with robots by using the getRobots, listen, and especially send RPCs
- Apply previously learned programming concepts, such as variables and loops, in order to move the robot both manually and autonomously
Description
Introduction to programming RoboScape robots.
The second day is dedicated to programming the robots with NetsBlox to carry our simple tasks. This will familiarize the students with robot programming in general, as well as lets them practice their newly acquired programming/NetsBlox skills.
Required/Authorized Commands
getRobots, set speed, and beep will be the primary needs. If time permits, using listen, get range, get ticks for the wall challenges will be necessary.
Glossary
Activities
- Introduction to NetsBlox robot programming
- Show basic commands and sensor data access. Students will do simple tasks such as having their robot beep at a specified frequency.
- Robot driving
- Implement program to enable driving the robot with the arrow keys. After giving students time to test ideas, organize a race around an obstacle course.
- Self-driving robot
- Implement a program that drives the robot around a large rectangle without user interaction. Organize a competition, and declare whoever has the shortest distance between start and end points as the winner.
- Get close to a wall without touching it
- Use get range and conditional statements such as "if" in order to stop the robot at a specific distance from the wall.
- Touch the wall and drive back to starting point
- Listen to the robot to be able to receive back messages using robot message. The whiskers will trigger one of these messages upon touching the wall. Use get ticks before beginning to move to get an initial reading, then use that data to return to the initial position.
Common Pitfalls
- Should readdress any issues students had with difficult concepts, such as loops and conditionals
Hints
- Driving a robot in a rectangle automatically is a lot like one of the previous NetsBlox projects (especially if your rectangle is also a square)