ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

little_bob's profile - activity

2023-05-22 12:14:00 -0500 received badge  Popular Question (source)
2023-05-22 12:14:00 -0500 received badge  Famous Question (source)
2023-05-22 12:14:00 -0500 received badge  Notable Question (source)
2023-03-27 10:22:56 -0500 received badge  Famous Question (source)
2022-06-19 19:20:43 -0500 received badge  Famous Question (source)
2021-10-11 02:11:36 -0500 received badge  Famous Question (source)
2020-10-11 15:55:09 -0500 received badge  Famous Question (source)
2019-12-18 03:02:50 -0500 received badge  Notable Question (source)
2019-12-18 03:02:50 -0500 received badge  Popular Question (source)
2019-11-13 07:42:56 -0500 received badge  Notable Question (source)
2019-11-13 07:42:56 -0500 received badge  Popular Question (source)
2019-03-27 05:19:08 -0500 received badge  Famous Question (source)
2019-02-18 01:49:57 -0500 commented answer Do the calculations are processed on the server in python format?

Got it, thank you for your reply. I wrongly thought that "add_two_ints(x,y)" is a method, actually, it is a service prox

2019-02-18 01:48:53 -0500 commented answer Do the calculations are processed on the server in python format?

Got it, thank you for your reply. I wrongly thought that "add_two_ints(x,y)" is a method, actually, it is a service prox

2019-02-18 01:43:53 -0500 marked best answer Do the calculations are processed on the server in python format?

I followed the official instructions to write simple Service Node, and I find there are some different places between C++ and Python formats.

In pyhton formats code of add_two_ints_client.py:

#!/usr/bin/env python

import sys
import rospy
from beginner_tutorials.srv import *

def add_two_ints_client(x, y):
    rospy.wait_for_service('add_two_ints')
try:
    add_two_ints = rospy.ServiceProxy('add_two_ints', AddTwoInts)
    resp1 = add_two_ints(x, y)
    return resp1.sum
except rospy.ServiceException, e:
    print "Service call failed: %s"%e

def usage():
     return "%s [x y]"%sys.argv[0]

if __name__ == "__main__":
if len(sys.argv) == 3:
    x = int(sys.argv[1])
    y = int(sys.argv[2])
else:
    print usage()
    sys.exit(1)
print "Requesting %s+%s"%(x, y)
print "%s + %s = %s"%(x, y, add_two_ints_client(x, y))

It seems that the addition is done within the client code:

add_two_ints = rospy.ServiceProxy('add_two_ints', AddTwoInts)
resp1 = add_two_ints(x, y)
return resp1.sum

But in C++ code it seems that the addition is done within the server and send the result back to the client. I will attach the link of the official tutorials: python service, c++ service. Is the python format code against Server/Client rule?

2019-02-18 01:43:53 -0500 received badge  Scholar (source)
2019-02-18 01:33:23 -0500 asked a question Do the calculations are processed on the server in python format?

Do the calculations are processed on the server in python format? I followed the official instructions to write simple S

2018-08-08 01:42:00 -0500 marked best answer About the 'time stamps' error in ROS

Hello,I am doing some work on ROS navigation,just at the start,and I encountered some problems.When I roslaunch the *.launch,there are a lot of erros like this:[ERROR] [1493084059.568174116]: Extrapolation Error: Lookup would require extrapolation into the future. Requested time 1493084059.049999952 but the latest data is at time 1493084059.012892115, when looking up transform from frame [odom] to frame [map].It seems that time differences exist during the program running.How can I fix this error or how can I set the time to be the same during the program?

2018-08-08 01:40:06 -0500 marked best answer What's the black area on RVIZ?

image description

2018-08-08 01:39:34 -0500 marked best answer import _Twist

the code on the book <ros by="" example="">and the tutorials are something like this:from geometry_msgs.msg import Twist,but when I type from geometry_msgs.msg import T,the sublime auto-completes it to this:from geometry_msgs.msg import _Twist.An underscore appears.Is it OK?And I find there is only _Twist.py in /opt/ros/hydro/lib/python2.7/dist-packages/geometry_msgs/msg

2018-08-08 01:38:41 -0500 received badge  Notable Question (source)
2018-08-08 01:38:21 -0500 received badge  Popular Question (source)
2018-08-08 01:37:19 -0500 marked best answer What's the default frequency of tf.Broadcaster?Is it 60HZ?

Can it be changed?

2018-08-08 01:36:15 -0500 marked best answer 2 questions about distro and map

1、can I connect my laptop(running Hydro) to the robot(running Indigo)?

2、How can I generate a map of the environment(this map I can store it and use it on RVIZ to do the simulation work)?I want to compare the real condition with the simulation condition. Thanks!

2018-08-08 01:35:00 -0500 marked best answer About the global planner

Hey,guys,good evening.I am am using move_base to navigate a little car.It works.But how can know which kind of global planner I am using?It seems that I didn't config this.

2018-07-30 10:11:21 -0500 received badge  Famous Question (source)
2018-07-09 14:04:50 -0500 marked best answer About the tf.Exception

I practice the tf according to tf_tutorials,but after I changed the codes liske what it said,an error happened and the process was killed.

Traceback (most recent call last):File "/home/bob/bob_catkin_practice/src/learning_tf/nodes/turtle_tf_listener.py", line 33, in <module>
"/world",rospy.Duration(2.0))tf.Exception: Lookup would require extrapolation into the past.  Requested time 1494079818.464235067 but the earliest data is at time 1494079823.260601044, when looking up transform from frame [turtle1] to frame [world][listener-6] process has died [pid 16244, exit code 1, cmd /home/bob/bob_catkin_practice/src/learning_tf/nodes/turtle_tf_listener.py __name:=listener __log:=/home/bob/.ros/log/bc22b5f4-3265-11e7-a3a0-000c2998b220/listener-6.log].log file: /home/bob/.ros/log/bc22b5f4-3265-11e7-a3a0-000c2998b220/listener-6*.log

Here is the file:

#!/usr/bin/env python
#coding:utf-8

import roslib
roslib.load_manifest('learning_tf')
import rospy
import math
import tf
import geometry_msgs.msg
import turtlesim.srv

if __name__ == '__main__':
    rospy.init_node('tf_turtle')

    listener=tf.TransformListener()
    rospy.wait_for_service('spawn')
    spawner=rospy.ServiceProxy('spawn',turtlesim.srv.Spawn)
    spawner(4,2,0,'turtle2')

    turtle_vel=rospy.Publisher('turtle2/cmd_vel',geometry_msgs.msg.Twist,queue_size=1)
    rate=rospy.Rate(10)
    listener.waitForTransform("/turtle2","/turtle1",rospy.Time(),rospy.Duration(4.0))

    while not rospy.is_shutdown():
        try:
            now=rospy.Time.now()
            past=now-rospy.Duration(5.0)
            listener.waitForTransformFull("/turtle2",now,
                                          "/turtle1",past,
                                          "/world",rospy.Duration(1.0))
            #(trans,rot)=listener.lookupTransform('/turtle2','/carrot1',now)
            (trans,rot)=listener.lookupTransformFull("/turtle2",now,
                                                     "/turtle1",past,
                                                     "/world")
        except (tf.LookupException,tf.ConnectivityException,tf.ExtrapolationException) :
            continue
        angular=4*math.atan2(trans[1],trans[0])
        linear=0.5*math.sqrt(trans[0]**2+trans[1]**2)
        cmd=geometry_msgs.msg.Twist()
        cmd.linear.x=linear
        cmd.angular.z=angular
        turtle_vel.publish(cmd)

        rate.sleep()

I am not very clear about the time in tf.

2018-07-09 14:02:37 -0500 marked best answer Can anyone explain the name of every distribution of ROS?

I think it must be very interesting.Diamondback means come back with glory?The Image of every distribution is really fantastic.here :D

2018-07-09 14:01:01 -0500 received badge  Famous Question (source)
2018-06-23 13:23:10 -0500 received badge  Notable Question (source)
2018-06-22 12:14:53 -0500 received badge  Famous Question (source)
2018-06-15 17:16:58 -0500 marked best answer What's the meaning of “There can be no more than one package in each folder”?

According to this tutorial,it says:"There can be no more than one package in each folder. This means no nested packages nor multiple packages sharing the same directory."But next to this, a catkin-work space can have many packages,how can it be explained?

2018-01-17 21:34:14 -0500 commented question the terminator report Name error :'global name : 'AddTwoIntsResponse' is not defined'.

If it stills acts badly, you can have another thread to ask about this. I am still confused. Maybe some onther guy will

2018-01-17 21:33:24 -0500 commented question the terminator report Name error :'global name : 'AddTwoIntsResponse' is not defined'.

Sorry, It's too long time ago. I can't remember the details about how to figure it out. But I think it is related to mul

2018-01-08 10:12:01 -0500 received badge  Famous Question (source)
2017-12-05 04:48:40 -0500 received badge  Popular Question (source)
2017-12-04 09:02:54 -0500 edited question Map rotates as the robot rotates

Map rotates as the robot rotates I am encountering a problem:using gmapping with rplidar gets really good map, but when

2017-12-04 09:02:25 -0500 received badge  Associate Editor (source)
2017-12-04 09:02:25 -0500 edited question Map rotates as the robot rotates

Map rotates as the robot rotates I am encountering a problem:using gmapping with rplidar gets really good map, but when

2017-12-04 09:01:44 -0500 asked a question Map rotates as the robot rotates

Map rotates as the robot rotates I am encountering a problem:using gmapping with rplidar gets really good map, but when

2017-11-29 23:16:05 -0500 received badge  Famous Question (source)
2017-11-29 23:15:41 -0500 commented answer Could not load controller 'smart_arm_controller', why?

have you resolved this?

2017-11-16 02:43:31 -0500 received badge  Famous Question (source)
2017-11-06 10:54:38 -0500 received badge  Notable Question (source)
2017-11-01 21:48:49 -0500 received badge  Notable Question (source)