Page 1 of 4 1234 LastLast
Results 1 to 10 of 34

Thread: PhantomX ROS Robot Project

  1. #1

    PhantomX ROS Robot Project

    Hi everyone,
    My friend martin is already on the forum, and we are working together on the project.
    I want to present the project on the forum, as I already started kind of hijacking other threads of KevinO, KurtE, etc,
    I will post all the advance and pertinent information here, and will post on the others when there is something relevant for the other thread subject too.
    The idea is using the Hexapod PhantomX Mark2 , using a small factor ARM board, in this case is a DuoVero gumstix, but could be any other one, we have a raspberry Pi, but we will not use is as the processor will not be enough for the OpenCV algorithms etc, we have a Prime Sense Camera the short range version.
    The final hardware that we'll use is not very important, but we would like to have in the end the Main Board (gumstix, running linux, ROS) controlling directly the Servos and running the Phoenix Code with using any arbotix. If we remove the arbotix and have to put the phoenix code on the gumstix, I will use the one is already in use for the RaspberryPi (KurtE and KevinO using it)

    1 - Rigth now we are having the arbotix, running the Phoenix Code ported by KurtE,
    for developing/test pourposes, we will use a a separate laptop with Linux/ROS (using Fuerte but will update to Groovy soon)
    and Using a TURTLEBOT INSTALLATION, with all the apps and packages that come with it, we modified the Driver Package to receive the driving commands via ROS .
    Rigth now is very buggy and limited, as we are emulating a virtual Commander, there is not change on Arbotix/Phoneix Code yet, but small configuration changes for our bot. But in the future we will have to modified to be able to acumulate
    Odometry, and Angle of rotation, etc.


    In the video, connected an Android App made for the turtlebot, an use the commander from there. This is just only for a test, as the main idea is to have the Bot walk and follow autonomously.

    any suggestion , critics, ideas, are always welcome .

    Cheers
    Ezequiel

    http://www.youtube.com/watch?v=6YmvRkbzvYc&feature=youtu.be

    <a href="http://www.youtube.com/watch?v=p2HrEkVfulI&amp;feature=youtu.be">




    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	IMG_20130716_155419.jpg 
Views:	386 
Size:	152.0 KB 
ID:	4879   Click image for larger version. 

Name:	Screenshot_2013-07-16-15-55-15.jpg 
Views:	392 
Size:	26.3 KB 
ID:	4884   Click image for larger version. 

Name:	IMG_20130716_155434.jpg 
Views:	387 
Size:	90.0 KB 
ID:	4880   Click image for larger version. 

Name:	IMG_20130716_155442.jpg 
Views:	406 
Size:	98.0 KB 
ID:	4881   Click image for larger version. 

Name:	IMG_20130716_161444.jpg 
Views:	387 
Size:	118.1 KB 
ID:	4882  

    Click image for larger version. 

Name:	IMG_20130716_161447.jpg 
Views:	437 
Size:	122.5 KB 
ID:	4883   Click image for larger version. 

Name:	Screenshot_2013-07-16-15-55-20.jpg 
Views:	355 
Size:	23.6 KB 
ID:	4885   Click image for larger version. 

Name:	Screenshot_2013-07-16-15-55-25.jpg 
Views:	376 
Size:	47.1 KB 
ID:	4886   Click image for larger version. 

Name:	Screenshot_2013-07-16-15-55-36.jpg 
Views:	366 
Size:	23.3 KB 
ID:	4887  
    Last edited by ezex; 07-16-2013 at 05:26 PM.

  2. #2
    Join Date
    Dec 2012
    Location
    Los Angeles, CA
    Posts
    860
    Images
    25
    Rep Power
    96

    Re: PhantomX ROS Robot Project

    Well done! Great start you have there! Can't wait to see more!

  3. #3

    Re: PhantomX ROS Robot Project

    thank you!
    each step on the project, has a lot to do, understand, and test !! .

    We are working on laptop, for all the coding, and puting togheter with ROS, etc, and ones there is something stable and working,
    we move on the gumstix .

  4. Re: PhantomX ROS Robot Project

    Hi Ezequiel,

    just found your thread after posting this one http://forums.trossenrobotics.com/showthread.php?6388-building-a-Linux-based-controller-solution

    I
    'm working partly at a university lab and we already build a Quadrokopter with Gumstix and Linux (the Linux does all the controlling in userspace!). Since I developed the Gumstix-Carrier board and just bought this Phantom robot I simple decided to put Linux on the Phantom.

    The boards I mentioned are already done. And I'm also having a working Linux for the 400MHz ARM board running.

  5. #5

    Re: PhantomX ROS Robot Project

    Yep - I missed this thread earlier as well.

    Looks like fun. I have been playing around recently with an ODroid U2 processor and have had my Linux port of the Phoenix code compiling for the processor using a few different Linux distributions (Arch (BBBK), Debian (RPI and U2), UBuntu 13.04. Right now I have Ubuntu 12.11 (Linaro 12.11)on it as there are some others up on the ODroid forum that are working on integrating in Ros, OpenCV... They are still working out some issues getting it integrated with Mali driver... Once they get this out, I thought it might be fun to try out ROS and maybe port the code over to it.

    Will be interested to watch as your project progresses.
    Kurt

  6. #6

    Re: PhantomX ROS Robot Project

    hi erazor and kurte

    i been out last month, as i was very busy with other projects and work
    I will be able to do some progress more next week, and i will
    try to more post.
    this is so much fun.

  7. #7

    Re: PhantomX ROS Robot Project

    hi erazor and kurte

    i been out last month, as i was very busy with other projects and work
    I will be able to do some progress more next week, and i will
    try to more post.
    this is so much fun.

  8. #8

    Re: PhantomX ROS Robot Project

    there still a lot to do in this project, but I wanted to share this video, of the hexapod, rigth now we are not using the gumstix installation, but an external ROS installation , for easy development, and then we are going to use a ROS on the smaller factor computer.

    We are using a STANDARD Turtlebot installation, and modified the driver to send the movements command to the hexapod,
    this is a test using the APP FOLLOWER from the turtlebot apps, we have to modified some parameters, and change some drivers and configs to make it work with the PrimeSense Carmine instead of the Kinect device.




    here is part of the code that connects ROS topics of movement to the hexapod/arbotix , is a WIP (work in progress)
    very buggy, and I have to find some errors, that change the gaits on the phoenix, randomly!

    this code connects to the STOCK Sketch for the Mark2, or using the ported phoneix Code by kurte.

    Code:
    #!/usr/bin/env python
    # Software License Agreement (BSD License)
    #
    #
    # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
    # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
    # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    # POSSIBILITY OF SUCH DAMAGE.
    #
    # Revision $Id$
    ## Simple Virtual Commander that listens to geometry_msgs.Twist
    ## published to the Topic /cmv_vel usint the turtlebot packages
    ## to test and drive the hexapod PhantomX Mark 2, with the Arbotix
    ## board, and the ported Kurte Phoneix Code, but should work on the
    ## stock sketch too.
    ## ezequiel goldberg  09/01/2013
    ##rosrun beginner_tutorials VirtualCommmander_listener.py
    ## WORK IN PROGRESS
    
    
    
    
    PKG = 'rospy_tutorials' # this package name
    import roslib; roslib.load_manifest(PKG)
    import time, sys, serial
    
    
    
    
    import rospy
    from geometry_msgs.msg import Twist
    
    
    	# Commander definitions
    BUT_R1 = 1
    BUT_R2 = 2  
    BUT_R3 = 4
    BUT_L4 = 8 
    BUT_L5 = 16
    BUT_L6 = 32
    BUT_RT = 64
    BUT_LT = 128
        
    
    
    class Commander():
    	
        def __init__(self):
        	 self.ser = serial.Serial()
        	 self.ser.baudrate = 38400
        	 self.ser.port = '/dev/ttyHEXAP'
        	 #self.ser.port = '/dev/ttyUSB1'
        	 self.ser.timeout = 0.5
        	 self.ser.open()
        	 self.right_vertical = 0
        	 self.right_horizontal  = 0
        	 self.left_vertical = 0
        	 self.left_horizontal = 0
        	 self.buttons = 0
        	 self.LinearMaxSpeed   = 127
        	 self.AngularMaxSpeed  = 127
        	 self.LinearSpeed   = 120
        	 self.AngularSpeed  = 100
             
           
        	 	
        def godrive(self):
        	 #Main loop Virtual Controller , push commands to arbotix at about 30Hz
        	 self.keepalive(0,0,0,0)
        	 self.keepalive(0,0,0,0)
        	 r = rospy.Rate(30) # 30Hz
        	 while not rospy.is_shutdown():
        	 	Buttons = self.buttons
        	 	self.sendPacket(self.right_vertical,self.right_horizontal,self.left_vertical,self.left_horizontal, Buttons)
        	 	r.sleep()
        		 	
        def sendPacket(self, right_vertical, right_horizontal, left_vertical, left_horizontal, Buttons):
            # send output
            self.ser.write('\xFF')
            self.ser.write(chr(right_vertical+128))
            self.ser.write(chr(right_horizontal+128))
            self.ser.write(chr(left_vertical+128))
            self.ser.write(chr(left_horizontal+128))
            self.ser.write(chr(Buttons))
            self.ser.write(chr(0))
            self.ser.write(chr(255 - ((right_vertical+right_horizontal+left_vertical+left_horizontal+Buttons)%256)))
            self.ser.flush()
            
            
        def updatevars(self, Twist):
        	#by default the keyboard teleop sends velocity at 0.3 linear speed
        	LinearSpeedFactor= 3.4
        	AngularSpeedFactor= 1
        	
        	# JOYSTICK  LEFT STICK
        	# tr (i k , )=>(left_vertical (1 0 -1)*speed
        	self.left_vertical   = int( Twist.linear.x * LinearSpeedFactor * self.LinearSpeed)
        	if (self.left_vertical>=128): self.left_vertical=127
        	if (self.left_vertical<=-128): self.left_vertical=-127
        	#if Twist.linear.x != 0 use Twist.angular.z for walk in angles
        	if(Twist.linear.x != 0.0):
        		self.left_horizontal= int(Twist.angular.z * AngularSpeedFactor * -self.LinearSpeed)
        		if (self.left_horizontal>=128): self.left_horizontal=127
        		if (self.left_horizontal<=-128): self.left_horizontal=-127
        	
        	
        	
        	# JOYSTICK  RIGTH STICK
        	# Rotation use angular.z and must be linear.x=0 to use J L for rotation
        	if(-0.3<Twist.linear.x<0.3)&(Twist.angular.z!=0.0):
        		self.right_horizontal  = int( Twist.angular.z * AngularSpeedFactor * self.AngularSpeed)
        		if (self.right_horizontal>=128): self.right_horizontal=100
        		if (self.right_horizontal<=-128): self.right_horizontal=-100
        		 
        	#if key "k" was pressed stop robot
        	if(-0.1<Twist.linear.x<0.1)&(Twist.angular.z==0.0):
        		self.stoprobot()
        	
        	  
        	
        def sendPacket(self, right_vertical, right_horizontal, left_vertical, left_horizontal, Buttons):
            # send output
            self.ser.write('\xFF')
            self.ser.write(chr(right_vertical+128))
            self.ser.write(chr(right_horizontal+128))
            self.ser.write(chr(left_vertical+128))
            self.ser.write(chr(left_horizontal+128))
            self.ser.write(chr(Buttons))
            self.ser.write(chr(0))
            self.ser.write(chr(255 - ((right_vertical+right_horizontal+left_vertical+left_horizontal+Buttons)%256)))
            self.ser.flush()
        
        def onClose(self, event=0):
            self.sendPacket(0,0,0,0,0)
            self.Destroy()
            
            		
        def stoprobot(self):
        		self.right_vertical = 0
        		self.right_horizontal  = 0
        		self.left_vertical = 0
        		self.left_horizontal = 0
        		self.presend()
        		  
        def keepalive(self,rv,rh,lv,lh):
        	self.sendPacket(rv, rh, lv, lh, 0)
        
        def presend(self, event=None):
            # configure output
            Buttons = 0
            self.sendPacket(self.right_vertical, self.right_horizontal, self.left_vertical, self.left_horizontal, Buttons)
            #while self.ser.inWaiting() > 0:
            #    print self.ser.read()
        	
    
    
    
    
    def callback(data):
        rospy.loginfo(rospy.get_caller_id()+"I got Lin(x,y,z)(%s,%s,%s) ",data.linear.x,data.linear.y,data.linear.z)
        rospy.loginfo(rospy.get_caller_id()+"I got Ang(x,y,z)(%s,%s,%s) ",data.angular.x,data.angular.y,data.angular.z)
        commander.updatevars(data)
    def listener():
    
    
        # in ROS, nodes are unique named. If two nodes with the same
        # node are launched, the previous one is kicked off. The 
        # anonymous=True flag means that rospy will choose a unique
        # name for our 'talker' node so that multiple talkers can
        # run simultaenously.
        rospy.init_node('listener', anonymous=0)
    
    
        rospy.Subscriber("/cmd_vel", Twist, callback)
    
    
        # spin() simply keeps python from exiting until this node is stopped
        #rospy.spin()
            
    if __name__ == '__main__':
    	commander = Commander()
    	listener()
    	commander.godrive()
    Last edited by ezex; 09-05-2013 at 06:43 PM.

  9. #9

    Re: PhantomX ROS Robot Project

    Any updates?

    I thought it would be fun to start playing around with ROS on NUC, so over the last couple of days I downloaded the ROS (Hydro) full desktop and started to play through some of the tutorials. Thought it might be fun to maybe migrate some/all of the Phoenix code to ROS and again remembered this thread.

    So i downloaded the turtlebot http://wiki.ros.org/turtlebot/Tutori...o/Installation
    But running into issue with my currently using Linux Mint 15. When I do the command:
    rosdep install --from-paths src -i -y
    I end up with several errors like:
    Code:
    ERROR: the following packages/stacks could not have their rosdep keys resolved
    to system dependencies:
    cmd_vel_mux: Unsupported OS [mint]
    kobuki_gazebo_plugins: Unsupported OS [mint]
    kobuki_qtestsuite: Unsupported OS [mint]
    turtlebot_panorama: Unsupported OS [mint]
    kobuki_ftdi: Unsupported OS [mint]
    turtlebot_actions: Unsupported OS [mint]
    Not sure if dead end yet or if there is a way to update rosdep to work with mint. I have done some searching and found there were previous issues with mint and rosdep and there was some code in it to map mint version to Ubuntu version. Potentially they have not updated it to map 15 to 13.04... I will probably create a new thread for this as I don't want to hijak this thread. But I was wondering if you made any additional progress.

    Thanks
    Kurt

  10. #10

    Re: PhantomX ROS Robot Project

    In case anyone else runs into this, so far I have been able to get around the above error by modifying the command line like:
    rosdep install --from-paths src -i -y --os=ubuntu:raring
    That was found in the comments of: http://answers.ros.org/question/4556...ll-on-mint-13/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question(s) Uploading the Hex_Mark II -- PhantomX robot
    By att5091 in forum Software and Programming
    Replies: 18
    Last Post: 06-16-2013, 11:31 AM
  2. Question(s) PhantomX AX Quadruped Mark II PhantomX Robot Turret Equipped??
    By hwan we in forum Robotics General Discussion
    Replies: 1
    Last Post: 03-11-2013, 03:09 PM
  3. PhantomX Reactor Robot Arm Video Thread
    By DresnerRobotics in forum Interbotix Robotic Arms
    Replies: 1
    Last Post: 02-26-2013, 02:12 PM
  4. Kurt's PhantomX Reactor Robot Arm
    By KurtEck in forum Interbotix Robotic Arms
    Replies: 11
    Last Post: 12-10-2012, 06:11 PM
  5. Question(s) Programming the PhantomX Robot Turret
    By dandbd in forum Arbotix, Microcontrollers, Arduino
    Replies: 53
    Last Post: 06-02-2012, 10:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •