Giter VIP home page Giter VIP logo

qboticslabs / chefbot_ros_pkg Goto Github PK

View Code? Open in Web Editor NEW
66.0 66.0 73.0 7.15 MB

This is ROS package mentioned in the book "Learning Robotics using Python". This package contain drivers, Launch files for working with Chefbot, mentioned on this book|New version of code for ROS Kinetic: https://github.com/PacktPublishing/Learning-Robotics-using-Python-Second-Edition

Home Page: http://learn-robotics.com

Python 26.39% C++ 52.02% CMake 1.92% C 17.82% Processing 1.85%

chefbot_ros_pkg's People

Contributors

peterchauyeg avatar qboticslabs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chefbot_ros_pkg's Issues

Arduino Port

Hi there,

The Tiva C used for this project didn't work out for me. My boards were defective and I got fed up with them so I used an Arduino instead. I ported your Tiva C code to Arduino C.

Would you like me to create a Pull Request for this repository with my ported code?

Thanks for the book,

Peter Chau

issue in twist_to_motors.py

subscribing to 'cmd_vel' did not work for us.
In our case, your previous commit 'cmd_vel_mux/input/teleop' worked fine.

Chapter 9 : Aiml > start_speech_chat.launch

After creating Pyaiml package as instructed with:

catkin_create_pkg ros_aiml rospy std_msgs sound_play

I copied the files from chapter 9 into ros_aiml package file.

I ran catkin_make and sourced the /devel/setup.bash

I then changed launch files to:

For some reason the error below constantly appears. Scripts folder does contain
the python scripts. Not sure whats happening.

ERROR: cannot launch node of type [ros_aiml/aiml_server.py]: can't locate node [aiml_server.py] in package [ros_aiml]
process[soundplay_node-2]: started with pid [7720]
ERROR: cannot launch node of type [ros_aiml/aiml_tts_client.py]: can't locate node [aiml_tts_client.py] in package [ros_aiml]
ERROR: cannot launch node of type [ros_aiml/aiml_speech_recog_client.py]: can't locate node [aiml_speech_recog_client.py] in package [ros_aiml]

How to call callback function?

Hello:
your diff_tf.cpp has ros::spinOnce() so I know how to call Odometry_calc::leftencoderCb() and Odometry_calc::rightcoderCb().

      But I found your diff_tf.py and pid_velocity.py don't rospy.spinOnce().I wonder how to call callback function?

      Looking forward to your reply.Thank you.

Chefbot -> MD25 controller and arduino mega modification.

Hello

I have the Chefbot successfully setup. Instead of using the tiva launch pad board. I am using the arduin mega and a pololu MD25 motor controller with integrated encoders. http://www.robot-electronics.co.uk/htm/md25i2c.htm. The arduino-mega talks to the MD25 by sending the the range of -128 (full reverse) 0 (Stop) 127 (full forward). What edits should be made on the pid_velocity.py or other scripts to accommodate this? For example what to do when dealing with theshold value or min-out and min-out.

Hope you can help.

Cheers.

cv_bridge_demo.py error using intel realsense

Hello.

I have been trying to run cv_bridge_demo.py using the Intel real sense camera. The error below constantly keeps appearing . Some forums say its to do with the depth camera mismatch.

Not sure ! hope you can help. its on chapter 7.

cv_bridge_demo.py:96: ComplexWarning: Casting complex values to real discards the imaginary part depth_array = np.array(depth_image, dtype=np.float32)

Help

Do you answer questions on here, not directly about your robot but about differential drive and how you used it?

Problem viewing color image using opencv

I have trouble viewing color images from R200 realsense camera using the python-opencv interface.
The window is blank when I run this script.
When I comment out'cv2.namedWindow("Image window", 1)', it shows the first image.

-P

import roslib
import sys
import rospy
import cv2
from std_msgs.msg import String
from geometry_msgs.msg import Twist
from sensor_msgs.msg import Image
from rospy.numpy_msg import numpy_msg
#from rospy_tutorials.msg import Floats
from cv_bridge import CvBridge, CvBridgeError
import numpy as np
import math;
import cv2;
#import matplotlib.pyplot as plt;
import sys;
#import caffe;
import socket;
#from sklearn import datasets;
import subprocess;

import message_filters
from rospy.numpy_msg import numpy_msg
import time
#####################

import os.path

class image_converter:

Initializing variables, publishers and subscribers

def init(self):
print 'show window'
cv2.namedWindow("Image window", 1)

print 'start bridge and subscribe'

self.bridge = CvBridge()

self.image_sub = rospy.Subscriber("/camera/rgb/image_color", Image, self.callback)

The main callback that processes the color and depth data.

def callback(self,color):

start = time.time()
# acquiring color and depth data (from ROS-python tutorial)
try:
  
  frame = self.bridge.imgmsg_to_cv2(color, "bgr8")
except CvBridgeError, e:
  print e
  
frame = np.array(frame, dtype=np.uint8)

cv2.imshow("Image window", frame)
print 'test'
cv2.waitKey(0)

def main(args):
ic = image_converter()
rospy.init_node('image_converter', anonymous=True)
try:
rospy.spin()
except KeyboardInterrupt:
print "Shutting down"
cv2.destroyAllWindows()

if name == 'main':
main(sys.argv)

how did you tune your PID controller?

thanks for your excellent book.

in
chefbot_bringup/scripts/pid_velocity.py

        self.Kp = rospy.get_param('~Kp',10)
        self.Ki = rospy.get_param('~Ki',10)
        self.Kd = rospy.get_param('~Kd',0.001)

however, in the book and the launch file
chefbot_bringup/launch/robot_standalone.launch

      <rosparam param="Kp">400</rosparam>
      <rosparam param="Ki">100</rosparam>
      <rosparam param="Kd">0</rosparam>

There is a significant difference between the defaults values in the python pid code and what you finally used. I am also guessing that the parameter ticks_meter (which depends on hardware encoder resolution * gear reduction) might influence the final Kp/Ki/Kd.
You must have somehow tuned your PID controller. But -- unless i missed it -- it says nothing about the procedure you used to tune it. I'm complete noob about PID.
Wikipedia does mention a manual procedure, but i could not implement it successfully with my own hard (in particular my ticks_meters value (that i did calibrate following its specific section in the book), is much lower.

Bottom line : how did you tune the Ki/Kp/Kd values of your pid controller?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.