
Hi,
I have tried to setup navigation stack to work with the robot from USARSim the same way as in tutorials, but when I start robot_configuration.launch and move_base.launch I get this error related to odometry:
Traceback (most recent call last):
File "/home/my_name/ros/usarsim/nodes/my_robot_nav.py", line 127, in <module>
pub_odom.publish(odom)
File "/opt/ros/diamondback/stacks/ros_comm/clients/rospy/src/rospy/topics.py", line 677, in publish
self.impl.publish(data)
...
buff.write(_struct_7d.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
AttributeError: 'numpy.ndarray' object has no attribute 'x'
[usarsim-1] process has died [pid 11052, exit code 1].
log files: /home/hrvoje/.ros/log/1bf16950-642a-11e0-894b-000c29c48bc7/usarsim-1*.log*
Section of code that publish odom:
odom_quat = tf.transformations.quaternion_from_euler(0,0,some_odom_theta_data)
odom.header.stamp = rospy.Time.now()
odom.header.frame_id = "odom"
odom.pose.pose.position.x = some_odom_x_data
odom.pose.pose.position.y = some_odom_y_data
odom.pose.pose.position.z = 0.0
odom.pose.pose.orientation = odom_quat
odom.child_frame_id = "base_link"
odom.twist.twist.linear.x = 0.0
odom.twist.twist.linear.y = 0.0
odom.twist.twist.linear.z = 0.0
pub_odom.publish(odom)
My odometry returns only position and orientation, but not the values for velocity!
Any suggestions will be helpful. Thanks in advance. hv
Originally posted by Jack Sparrow on ROS Answers with karma: 83 on 2011-04-11
Post score: 4
Original comments
Comment by Jack Sparrow on 2011-04-11:
the problem starts after running move_base.launch, not after robot_configuration.launch
Comment by Jack Sparrow on 2011-04-11:
I followed http://www.ros.org/wiki/navigation/Tutorials/RobotSetup and the section http://www.ros.org/wiki/navigation/Tutorials/RobotSetup/Odom for odometry
Comment by Eric Perko on 2011-04-11:
Which tutorial are you following?