ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2018-01-28 05:07:25 -0500 | received badge | ● Famous Question (source) |
2017-05-19 08:20:07 -0500 | received badge | ● Famous Question (source) |
2014-10-10 08:58:42 -0500 | received badge | ● Popular Question (source) |
2014-10-10 08:58:42 -0500 | received badge | ● Notable Question (source) |
2014-06-08 11:35:43 -0500 | received badge | ● Notable Question (source) |
2014-02-08 04:06:03 -0500 | received badge | ● Popular Question (source) |
2013-11-22 03:36:25 -0500 | asked a question | irobot_create bumper Hello, i am going to use bumper with Turtlebot1 Although i ran the source as below, i couldn't run the callback function. Why? |
2013-11-20 22:29:47 -0500 | asked a question | turtlrbot1 bumper Hello, i am going to use bumper with Turtlebot1 Although i ran the source as below, i couldn't run the callback function. Why? |
2013-11-20 21:32:11 -0500 | received badge | ● Editor (source) |
2013-11-20 21:25:47 -0500 | asked a question | turtlebot1 bumper T_T Bumper sensor is not working.. why?? #!/usr/bin/env python import roslib; roslib.load_manifest('create_node') import rospy from geometry_msgs.msg import Twist from create_node.msg import TurtlebotSensorState global variablesbump = False listen (adapted from line_followerdef processSensing(TurtlebotSensorState): global bump bump = TurtlebotSensorState.bumps_wheeldrops > 0 #newInfo = True def hello_create(): pub = rospy.Publisher('mobile_base/commands/velocity', Twist) rospy.Subscriber('/create_node/sensor_state', TurtlebotSensorState, processSensing) rospy.init_node('hello_create') #listen global bump twist = Twist() while not rospy.is_shutdown(): if bump: str = "hello create, you have bumped into something %s"%rospy.get_time() rospy.loginfo(str) twist.linear.x = 0; twist.linear.y = 0; twist.linear.z = 0 twist.angular.x = 0; twist.angular.y = 0; twist.angular.z = 0 bump = False else: str = "hello create, you can spin now %s"%rospy.get_time() rospy.loginfo(str) twist.linear.x = 0.1; twist.linear.y = 0; twist.linear.z = 0 twist.angular.x = 0; twist.angular.y = 0; twist.angular.z = 0.1 pub.publish(twist) rospy.sleep(0.25) if __name__ == '__main__': try: hello_create() except rospy.ROSInterruptException: pass |