- sudo apt-get update
- sudo apt-get install python-rpi.gpio python3-rpi.gpio
- sudo apt-get update
- sudo pip install RPi.GPIO
- cs -- or -- cd ~/catkin_ws/src
- git clone https://github.com/KhairulIzwan/turtlebot3_gpio_control.git
- cm -- or -- cd ~/catkin_ws/
- rospack profile ---> to ensure the package; executed node available (updated)
- rosdep install --from-paths src --ignore-src -r -y
- cm -- or -- cd ~/catkin_ws/
This usecase shows even more powerful feature of rosdep. This command magically installs all the packages that the packages in your catkin workspace depend upon but are missing on your computer.
- Connect the LED (Cathode -- Ground (PIN#06), Anode -- GPIO18 (PIN#12))
- roscore (REMOTE PC) ---
- rosrun turtlebot3_gpio_control blink_LED.py (RasPi -- TURTLEBOT3 PC)
- rostopic pub /led_blink ool "data: false" --- turn "OFF" the LED
- rostopic pub /led_blink ool "data: true" --- turn "ON" the LED