- FC-03
- Toy DC motor
I have used Arduino Mega 2560. Also there is firmware for Arduino M0.
Pin 2 (for Arduino M0 - pin 3) was connected to FC-03 digital output. 5V and GND was connected to appropriate inputs of FC-03. The following hardware RC filter was applied for FC-03 digital output:
More details about filter can be found here.
Motor was connected using this circuit:
For development the following docker container was used. To pull it please run
docker pull shadowrobot/build-tools:xenial-kinetic-ide
If you want to run everything from docker container use the following command
docker run -it --name meetup_demo --privileged -e DISPLAY -e LOCAL_USER_ID=$(id -u) -v /dev/ttyUSB0:/dev/ttyUSB0 -v /tmp/.X11-unix:/tmp/.X11-unix:rw shadowrobot/build-tools:xenial-kinetic-ide
For Arduino M0 the following command was used
docker run -it --name meetup_demo --privileged -e DISPLAY -e LOCAL_USER_ID=$(id -u) -v /dev/bus/usb:/dev/bus/usb -v /dev/ttyACM0:/dev/ttyACM0 -v /tmp/.X11-unix:/tmp/.X11-unix:rw shadowrobot/build-tools:xenial-kinetic-ide
Also uninstallation of modemmanager was required on host machine in order to connect and detect USB connection of Arduino M0.
Go to ~/workspace/src folder on Docker container. Clone repository
git clone https://github.com/AndriyPt/rosserial-arduino-examples.git
Got to ~/workspace. Install dependencies.
rosdep install --from-paths src --ignore-src --rosdistro kinetic -y
Compile source code
catkin_make
and
source ~/workspace/devel/setup.bash
Download and extract Arduino IDE in home folder.
In Arduino's libraries folder run
source ~/workspace/devel/setup.bash
rm -rf ros_lib
rosrun rosserial_arduino make_libraries.py .
More details can be found here.
In order to check robot's URDF and move it's joint run
roslaunch first_description display.launch gui:=True
roslaunch first_launch simulation.launch
roslaunch first_launch real_robot.launch
Different tools are available in RQT
rqt