Commit 90a91d17 authored by Simon M. Haller-Seeber's avatar Simon M. Haller-Seeber
Browse files

Added doc

parent b4257a66
## RVR Sphero Mini-Robot
# RVR Sphero
### sphero_rvr
This ros modules contain an experimental ROS Node for the Sphero RVR.
It is based on Rud Merriam's "RVR CPP" https://bitbucket.org/rmerriam/rvr-cpp/src/master/ (see rvr++ folder) and
running on a Jetson Nano 2GB running a minimal Ubuntu 20.04.
## Sphero RVR
Currently a very rough base_controller that responds to cmd_vel/Twist.
This ros modules contain an experimental ROS Node for the Sphero RVR.
The cpp version is based on Rud Merriam's "RVR CPP" https://bitbucket.org/rmerriam/rvr-cpp/src/master/ (see sphero_rvr_hw/src/base_controller.cpp). The python(3) version is based on the official Sphero RVR Pyhton SDK (see sphero_rvr_hw/scripts/rvr-ros.py)
Both version use /cmd_vel and publish to odom.
There is still no real ros_control package (the stubs are already there - see sphero_rvr_hw/src/sphero_rvr_*).
### Lynxmotion 4DoF arm
### Startup
To run the python version:
- source ~/minibot/catkin_ws/devel.setup.bash
- start a roscore
- python3 ~/minibot/catkin_ws/src/sphero_rvr/spehro_rvr_hw/scripts/rvr-ros.py
To run the cpp version
- source ~/minibot/catkin_ws/devel.setup.bash
- catkin build
- roslaunch sphero_rvr_hw rvr_ros.launch
#!/usr/bin/env python3
from math import pi
import os
import sys
import logging
import asyncio
from sphero_sdk import SpheroRvrAsync
from sphero_sdk import SerialAsyncDal
from sphero_sdk import RvrStreamingServices
from sphero_sdk import RawMotorModesEnum
import traceback
import tf
import rospy
import signal, sys
from geometry_msgs.msg import PoseWithCovariance
from geometry_msgs.msg import Pose
from geometry_msgs.msg import TwistWithCovariance
from geometry_msgs.msg import Twist
from geometry_msgs.msg import Point
from geometry_msgs.msg import Quaternion
from geometry_msgs.msg import Vector3
from nav_msgs.msg import Odometry
from std_msgs.msg import Header
from std_msgs.msg import String
def lala_cb(mymsg):
print("lala")
if __name__ == '__main__':
print("Starting Sphero RVR HW Python node")
rospy.init_node('listener', anonymous=True)
rospy.Subscriber("lala", String, lala_cb)
br = tf.TransformBroadcaster()
r = rospy.Rate(10) # 10hz
try:
#asyncio.ensure_future(rvr_robot())
while not rospy.is_shutdown():
#loop.run_until_complete(asyncio.gather(handle_ros()))
r.sleep()
#asyncio.ensure_future(handle_ros())
#loop.run_forever()
except KeyboardInterrupt:
print('\nProgram terminated with keyboard interrupt.')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment