All Projects → rt-net → raspimouse2

rt-net / raspimouse2

Licence: Apache-2.0 License
ROS 2 node for Raspberry Pi Mouse

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to raspimouse2

Awesome Robotic Tooling
Tooling for professional robotic development in C++ and Python with a touch of ROS, autonomous driving and aerospace.
Stars: ✭ 1,876 (+8056.52%)
Mutual labels:  robot, ros2
awesome-webots
Awesome Webots
Stars: ✭ 46 (+100%)
Mutual labels:  robot, ros2
raspimouse ros2 examples
ROS 2 examples for Raspberry Pi Mouse
Stars: ✭ 29 (+26.09%)
Mutual labels:  raspberry-pi-mouse, ros2
raspimouse ros examples
ROS examples for Raspberry Pi Mouse
Stars: ✭ 17 (-26.09%)
Mutual labels:  raspberry-pi-mouse, raspimouse
elliot on g0d
elliot_on_g0d
Stars: ✭ 17 (-26.09%)
Mutual labels:  robot
navigation2 tutorials
Tutorial code referenced in https://navigation.ros.org/
Stars: ✭ 60 (+160.87%)
Mutual labels:  ros2
SMACC2
An Event-Driven, Asynchronous, Behavioral State Machine Library for ROS2 (Robotic Operating System) applications written in C++
Stars: ✭ 58 (+152.17%)
Mutual labels:  ros2
Windows-Python-RAT
A New Microsoft Windows Remote Administrator Tool [RAT] with Python by Sir.4m1R.
Stars: ✭ 70 (+204.35%)
Mutual labels:  robot
mros2
agent-less and lightweight communication library compatible with rclcpp for embedded devices
Stars: ✭ 72 (+213.04%)
Mutual labels:  ros2
zhe
Lighter-than-air, peer-to-peer, bounded, non-blocking, non-threaded, etc., publish-subscribe networking
Stars: ✭ 44 (+91.3%)
Mutual labels:  ros2
SMARTmBOT
The goal of this repository is to introduce a new, customizable, scalable, and fully opensource mobile robot platform, called SMARTmBOT. This repository provides a guide, and all design files and source codes so that you can build your own SMARTmBOT. SMARTmBOT can be useful for studying the basics of robotics, especially mobile robotics. It can …
Stars: ✭ 29 (+26.09%)
Mutual labels:  ros2
skynet robot control rtos ethercat
Realtime 6-axis robot controller, based on Qt C++ & OpenCascade & KDL kinematics & HAL
Stars: ✭ 41 (+78.26%)
Mutual labels:  robot
gym-line-follower
Line follower robot simulator environment for Open AI Gym.
Stars: ✭ 46 (+100%)
Mutual labels:  robot
scout ros
This repository ROS package is suit for scout 2 and scout mini
Stars: ✭ 30 (+30.43%)
Mutual labels:  ros2
robot
Functions and classes for gradient-based robot motion planning, written in Ivy.
Stars: ✭ 29 (+26.09%)
Mutual labels:  robot
raspimouse sim
ROS package suite for Raspberry Pi Mouse Simulator
Stars: ✭ 23 (+0%)
Mutual labels:  raspberry-pi-mouse
ros-gst-bridge
a bidirectional ros to gstreamer bridge and utilities for dynamic pipelines
Stars: ✭ 46 (+100%)
Mutual labels:  ros2
TelegramTrader-MT4-MT5
Connect Telegram Messenger to Metatrader for Live Quotes, Charts, Trading, and Managing Robots(Expert Advisors)
Stars: ✭ 74 (+221.74%)
Mutual labels:  robot
vbot-tuling
微信 图灵机器人
Stars: ✭ 20 (-13.04%)
Mutual labels:  robot
Peabot-Library
Peabot: quadruped robot library for Raspberry Pi
Stars: ✭ 18 (-21.74%)
Mutual labels:  robot

Raspimouse Node

ROS 2 node for the Raspberry Pi Mouse.

raspimouse

Build Status

master branch

industrial_ci

Source Build Status on ROS2 Buildfarm

Foxy + Focal (foxy-devel)

raspimouse raspimouse_msgs
Build Status Build Status

Requirements

Installation

Binary Insallation

$ sudo apt install ros-$ROS_DISTRO-raspimouse

Source Build

$ cd ~/ros2_ws/src
# Clone package
$ git clone -b $ROS_DISTRO-devel https://github.com/rt-net/raspimouse2

# Install dependencies
$ rosdep install -r -y -i --from-paths .

# Build & Install
$ cd ~/ros2_ws
$ colcon build --symlink-install
$ source ~/ros2_ws/install/setup.bash

QuickStart

# Terminal 1
$ source ~/ros2_ws/install/setup.bash
$ ros2 run raspimouse raspimouse


# Terminal 2
$ source ~/ros2_ws/install/setup.bash
$ ros2 lifecycle set raspimouse configure

# Set buzzer frequency
$ ros2 topic pub -1 /buzzer std_msgs/msg/Int16 '{data: 1000}'
$ ros2 topic pub -1 /buzzer std_msgs/msg/Int16 '{data: 0}'

# or rotate motors
$ ros2 lifecycle set raspimouse activate
$ ros2 service call /motor_power std_srvs/SetBool '{data: true}'
$ ros2 topic pub -1 /cmd_vel geometry_msgs/Twist '{linear: {x: 0.05, y: 0, z: 0}, angular: {x: 0, y: 0, z: 0.05}}'
$ ros2 lifecycle set raspimouse deactivate

Node Description

This is a managed-lifecycle node. The node must be configured and activated after being launched before the robot can be used. If running the node manually, after launching the node execute the following command to configure it:

$ ros2 lifecycle set raspimouse configure

If configuration succeeds, execute the following command to activate the node:

$ ros2 lifecycle set raspimouse activate

The robot can now be controlled and sensor information will be published.

The node can be deactivated using the following command:

$ ros2 lifecycle set raspimouse deactivate

This will disable publishing sensor data and stop the motors.

When the node is active, motor functionality can be tested by turning on the motors and sending a velocity command.

$ ros2 service call /motor_power std_srvs/SetBool '{data: true}'
$ ros2 topic pub -1 /cmd_vel geometry_msgs/Twist '{linear: {x: 0.05, y: 0, z: 0}, angular: {x: 0, y: 0, z: 0.05}}'

Odometry information can be checked by echoing the odom topic.

$ ros2 topic echo /odom

Similarly other sensor information can also be viewed by echoing the relevant topic.

Topics

Subscribed

  • buzzer

    Type: std_msgs/Int16

    Used to control the buzzer. Provide a value in Hertz and the buzzer will emit that tone.

  • cmd_vel

    Type: geometry_msgs/Twist

    Controls the motors. Specify the forward and turning speeds of the robot.

  • leds

    Type: raspimouse_msgs/Leds

    Turns the four LEDs on the front of the robot on and off.

Published

  • light_sensors

    Type: raspimouse_msgs/LightSensors

    Provides the raw values from the light sensors on the front of the robot.

  • odom

    Type: nav_msgs/Odometry

    Provides odometry. If hardware pulse counters are available and the use_pulse_counters parameter is set to true, the odometry is calculated from the motor control pulse counts. Otherwise, the odometry is estimated based on the velocity commands given to the robot and elapsed time.

  • switches

    Type: raspimouse_msgs/Switches

    Provides the status of each of the three push switches on the side of the robot.

Services

  • motor_power

    Type: std_srvs/SetBool

    Call this service and pass true to enable the motors. Pass false to disable the motors.

Parameters

  • odometry_scale_left_wheel

    Type: double

    Default: 1.0

    Use to adjust the odometry input from the left wheel (when using pulse counters to calculate odometry). This is used to account for slight differences in wheel diameter and wheel slip between the left and right wheels.

  • odometry_scale_right_wheel

    Type: double

    Default: 1.0

    Use to adjust the odometry input from the right wheel (when using pulse counters to calculate odometry). This is used to account for slight differences in wheel diameter and wheel slip between the left and right wheels.

  • use_light_sensors

    Type: boolean

    Default: true

    Enable or disable the light sensors on the front of the robot.

  • use_pulse_counters

    Type: boolean

    Default: false

    Use hardware pulse counters as the odometry source. When set to true, hardware pulse counters will be used only if present.

  • wheel_diameter

    Type: double

    Default: 0.048

    Sets the diameter of the robot's wheel. The unit is in meters.

  • wheel_tread

    Type: double

    Default: 0.0925

    Sets the distance between the wheels. The unit is in meters.

  • pulses_per_revolution

    Type: double

    Default: 400.0

    Sets the number of pulses needed for 1 rotation of the used motor.

  • light_sensors_hz

    Type: double

    Default: 100.0

    Sets the frequency of the publishing rate of the topic /light_sensors. The unit is in Hz.

License

This repository is licensed under the Apache 2.0, see LICENSE for details.

Contributors

Contributions are always welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].