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

Jack Sparrow's profile - activity

2021-08-02 00:04:00 -0500 received badge  Good Question (source)
2018-10-07 08:51:11 -0500 received badge  Nice Question (source)
2014-01-28 17:22:02 -0500 marked best answer Multi-robot navigation

Hi,

I have problem with implementing navigation to work with multiple robots. Errors:

Waiting on transform from /robot_1/base to /map to become available before running costmap, tf error: Frame id /robot_1/base does not exist!
Waiting on transform from /robot_2/base to /map to become available before running costmap, tf error: Frame id /robot_2/base does not exist!

Probably, the problem is in transformations that transform /map to /base and not from /map to /robot_1/base. I use groups/namespaces in launch file to separate each robot node with correspondiong move_base node from other nodes. To run navigation stack I launch robot_configuaration.launch and move_base.launch. I have found the following solution:

<launch>
  <group ns="robot_1">
    <param name="tf_prefix" value="robot_1"/>
    <node pkg="usarsim" type="usarsim.py" respawn="false" name="usarsim_1" output="screen">
  </group>
  <group ns="robot_2">
    <param name="tf_prefix" value="robot_2"/>
    <node pkg="usarsim" type="usarsim2.py" respawn="false" name="usarsim_2" output="screen">
  </group>

and

<launch>
  <node name="map_server" pkg="map_server" type="map_server" args="/home/user/Desktop/ROS/map.pgm 0.05" respawn="false">
  </node>

  <group ns="robot_1"><br>
    <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
      <rosparam file="$(find robot_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" />
      <rosparam file="$(find robot_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />
      <rosparam file="$(find robot_2dnav)/local_costmap_params.yaml" command="load" />
      <rosparam file="$(find robot_2dnav)/global_costmap_params.yaml" command="load" />
      <rosparam file="$(find robot_2dnav)/base_local_planner_params.yaml" command="load" /><br>
    </node><br>
  </group>

  <group ns="robot_2">
    <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    ...same as for group_1

but this doesn't work. Is there some solution to automatically map all topics and tf's directly from .launch file?

2014-01-28 17:21:58 -0500 marked best answer Understanding navigation stack

Hi,

I have trouble of understanding how navigation stack works. After days of debugging code to work with navigation stack I have concluded that its either problem in tf or I dont really understand how navigation stack work. Specifically I have a couple of questions/problems:

  1. When I change tf to some reasonable parameters from my initial parameter, that should work, I get that my laser sensor is out of range, exactly - on some negative x or y positions. Does navigation work only with positive x and y?
  2. My simulation is left oriented, so this might be problem with getting to work with navigation. But, when I left x an y signed positive or negative as I get from my odometry or change x to -x to compensate left-right orientation my robot's footprint moves in rviz always in the same direction. Should't be that in opposite direction? Is navigation right oriented? What problem I might get with left-right orientations?
  3. My main problem is that when the robot in, let's say, position (x,y,orient)=(5,5,0) /map frame, and I send goal from rviz in /map frame to (6,5,0), robot gets positive x command velocity from navigation, but when the goal point is reached robot remains to move in +x direction, the output from navigation (cmd_vel) remains the same as before reaching goal. Same problem with y direction, both + and -y.

Some help needed, thanks.

2013-11-30 14:01:58 -0500 received badge  Good Question (source)
2013-09-11 00:41:45 -0500 received badge  Taxonomist
2013-04-19 04:23:31 -0500 received badge  Famous Question (source)
2013-04-19 04:23:31 -0500 received badge  Notable Question (source)
2013-04-19 04:23:31 -0500 received badge  Popular Question (source)
2012-10-23 06:13:50 -0500 received badge  Famous Question (source)
2012-08-15 16:39:51 -0500 received badge  Famous Question (source)
2012-07-12 08:28:56 -0500 received badge  Notable Question (source)
2012-04-22 23:29:24 -0500 marked best answer Error assigning a python quaternion

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

2012-01-23 23:32:11 -0500 received badge  Notable Question (source)
2011-11-12 06:27:54 -0500 received badge  Popular Question (source)
2011-08-05 00:13:08 -0500 received badge  Popular Question (source)
2011-05-05 08:05:32 -0500 marked best answer Multi-robot navigation

Well, it turns out that the python version of transformBroadcaster has a bug in that it doesn't read the tf_prefix parameter. I've filed a ticket to have this fixed here: https://code.ros.org/trac/ros-pkg/ticket/4943.

In the meantime, you have a couple of options:

1) Write the search param logic yourself for the transformBroadcaster, submit a patch to the above ticket, get mad props from the ROS community for fixing a bug :)

2) Have a parameter on your node that allows you to change the frame name before you pass it to the transformBroadcaster.

3) Switch to the C++ API which works as expected.

Hope this helps.

2011-05-03 03:43:13 -0500 commented answer Multi-robot navigation
Yes, with transformBroadcaster. The following code is the same for robot_1 and robot_2: broadcaster.sendTransform(position, orientation, rospy.Time.now(), "odom", "map"). Do I need to change odom for every robot_x to /robot_x/odom manually or this is done automatically with tf_prefix?
2011-04-30 08:08:03 -0500 commented answer Multi-robot navigation
http://www.megaupload.com/?d=DCTZSB2Q I guess something is wrong here... Can you tell me what does tf_prefix do? Isn't that for remapping tf frames (odom->robot_x/odom)?
2011-04-29 08:55:19 -0500 commented answer Multi-robot navigation
Yes, in rviz everything looks ok!
2011-04-29 00:54:37 -0500 received badge  Commentator
2011-04-29 00:54:37 -0500 commented question move_base warning sensor out of bounds
There is probably problem with your localization. Global costmap uses map from map server for it's costmap. When you haven't localized properly your robot, robot might get outside your map borders and then you receive and error. There might be also a problem with your transformations. Cheers
2011-04-29 00:37:58 -0500 commented answer Multi-robot navigation
Yes, I tried to setup my launch file similar to this navigation_stage .launch, but I don't use fake localization, and stageros node.
2011-04-28 23:46:50 -0500 commented answer Multi-robot navigation
This problem with /scan was in costmap_common_params.yaml. Now i get no errors, changed ~tf_prefix to tf_prefix, but navigation doesn't give any sign of life, no footprint, no obstacles, no path.. edit: without ~ navigation doesn't subscribe to most of topics, including scan and odom