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

arcanum's profile - activity

2019-05-29 14:41:20 -0500 received badge  Famous Question (source)
2019-05-29 14:40:58 -0500 received badge  Famous Question (source)
2016-08-25 04:27:37 -0500 received badge  Notable Question (source)
2016-06-14 07:14:45 -0500 received badge  Notable Question (source)
2016-06-07 00:48:04 -0500 received badge  Popular Question (source)
2016-06-06 12:12:48 -0500 asked a question My code is not working

I tried to make a node that uses tf2 to read a transform of frame 'a_link', and broadcasts another transform called 'b_link' that is one centimetre in the positive y direction from that frame.

It should also publish a pose message to a rostopic with a good name.

This is my code

But it is not working

#!/usr/bin/env python  
import roslib
import rospy
import math
import tf2_ros
import geometry_msgs.msg
import turtlesim.msg

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

  tfBuffer =  tf2_ros.Buffer()
  listener =  tf2_ros.TransformListener(tfBuffer)
  rospy.wait_for_service('transform')


  while not rospy.is_shutdown():

  time_now= rospy.Time.now()
  listener.lookupTransform('new_link','a_link',time_now,transform)


  br = tf2_ros.TransformBroadcaster()
  t = geometry_msgs.msg.TransformStamped()
  t.header.stamp = rospy.Time.now()
  t.header.frame_id = "end_effector_tip"
  t.child_frame_id = end effector
  t.transform.translation.x = new_link.x;
  t.transform.translation.y = 1+new_link.y;
  t.transform.translation.z = new_link.z;
  q = tf.transformations.quaternion_from_euler(0, 0, new_link.theta)
  t.transform.rotation.x = q[0]
  t.transform.rotation.y = q[1]
  t.transform.rotation.z = q[2]
  t.transform.rotation.w = q[3]

  br.sendTransform(t) 

   if __name__ == '__main__':
    rospy.init_node('b_link')
    rospy.Subscriber('/%s/pose' 'b_link_transform' b_link.pose )

 rospy.spin()
2016-06-03 12:25:03 -0500 received badge  Popular Question (source)
2016-05-27 06:45:23 -0500 asked a question I cannot find beginner_tutorials

whenever i use roscd beginner_tutorials i always get no such directoru found please help ?