Skip to content

kumahika/GPIO_output

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPIO_output package

This is a ROS wrapper for BlueRobotics Screw, Gripper and Sonar.

In addition, this package assumes connecting a screw and gripper to Rasberry Pi GPIO, and snonar to USB. Please refer to the following sites for parts installation and circuit wiring.

How to use it (ROS set up)

Step0 : ssh conection to Rasberrypi.

$ ssh pi@ip_adress_of_your_raspi
type passward

Step1 : change directory and gitclone this repository.

$ cd ~/your_ws/src
$ gitclone https://github.com/kumahika/GPIO_output

Step3 : build(In the case of 'catkin_make')

$ cd ~/your_ws/
$ catkin_make

Step4 : Grant execute permission

$ cd ~/your_ws/src/GPIO_output/src
$ chmod +x screw_sub.py
$ chmod +x gripper.py
$ chmod +x sonar_pub.py

Step5 : Run a screw node if the build is successful.

$ cd ~/your_ws/
$ source devel/setup.bash
$ rosrun GPIO_output screw_sub.py

Step6 : Run multi nodes using roslaunch.

$ roslaunch GPIO_output act3.launch

Step7 debug

Check all topics

$ rostopic list
/gripper/pwm
/rosout
/rosout_agg
/screw/pwm
/sonar/confidence
/sonar/distance
/sonar/ping_interval
/sonar/ping_number
/sonar/scan_length
/sonar/scan_start
/sonar/speed_of_sound
/sonar/transmit_duration
/sonar/voltage

Screw operation test

$ rostopic pub /screw/pwm std_msgs/Int64 -- '3'
ON OF
mid

Gripper operation test

$ rostopic pub /gripper/pwm std_msgs/Int64 -- '3'
Open and Close
mid

Rosparam setting

You can set up pwm duty and duration of screw and gripper. Execute the following code or specify options in the launch file.

$ rosparam set /screw_subscreiber/duration_screw '2' # unit is sec
$ rosparam set /duration_gripper '2' # unit is sec
$ rosparam set /screw_subscreiber/pwm_screw '100' # You can set duty between -100 and 100.

About

This is a ROS wrapper for BlueRobotics Screw, Gripper and Sonar.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages