Ask Your Question

Zayin's profile - activity

2020-12-12 12:12:54 -0500 received badge  Nice Question (source)
2020-06-10 09:49:15 -0500 received badge  Nice Question (source)
2019-06-21 07:38:37 -0500 received badge  Famous Question (source)
2018-06-07 09:29:48 -0500 received badge  Nice Question (source)
2018-04-16 19:56:28 -0500 received badge  Self-Learner (source)
2017-11-18 09:04:55 -0500 received badge  Nice Question (source)
2016-11-08 23:28:39 -0500 received badge  Nice Answer (source)
2016-05-03 16:09:08 -0500 received badge  Notable Question (source)
2016-01-01 05:47:42 -0500 received badge  Popular Question (source)
2016-01-01 05:47:42 -0500 received badge  Notable Question (source)
2015-11-28 16:41:42 -0500 marked best answer Turtlebot_node Sensor State on Stage

I want to simulate a Turtlebot on Stage, more precisely its bumps_wheeldrops parameter from the TurtlebotSensorState message. How can I set it up?

Here is my current launch file:

<launch>
  <master auto="start"/>
  <param name="/use_sim_time" value="true"/>  
  <node pkg="stage" type="stageros" name="stage" args="$(find stage)/world/willow-erratic.world" respawn="false" output="screen"/>

  <node pkg="diagnostic_aggregator" type="aggregator_node" name="diagnostic_aggregator" >
    <rosparam command="load" file="$(find turtlebot_bringup)/config/diagnostics.yaml" />
  </node>

  <node pkg="robot_state_publisher" type="state_publisher" name="robot_state_publisher" output="screen">
    <param name="publish_frequency" type="double" value="30.0" />
  </node>

  <!-- The odometry estimator -->
  <node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
    <param name="freq" value="30.0"/>
    <param name="sensor_timeout" value="1.0"/>
    <param name="publish_tf" value="true"/>
    <param name="odom_used" value="true"/>
    <param name="imu_used" value="true"/>
    <param name="vo_used" value="true"/>
  </node>

  <!-- throttling -->
  <node pkg="nodelet" type="nodelet" name="pointcloud_throttle" args="load pointcloud_to_laserscan/CloudThrottle openni_manager" respawn="true">
    <param name="max_rate" value="20.0"/>
    <remap from="cloud_in" to="/camera/depth/points"/>
    <remap from="cloud_out" to="cloud_throttled"/>
  </node>

  <!-- Fake Laser -->
  <node pkg="nodelet" type="nodelet" name="kinect_laser" args="load pointcloud_to_laserscan/CloudToScan openni_manager" respawn="true">
    <param name="output_frame_id" value="/camera_depth_frame"/>
    <!-- heights are in the (optical?) frame of the kinect -->
    <param name="min_height" value="-0.15"/>
    <param name="max_height" value="0.15"/>
    <remap from="cloud" to="/cloud_throttled"/>
  </node>

  <!-- Fake Laser (narrow one, for localization -->
  <node pkg="nodelet" type="nodelet" name="kinect_laser_narrow" args="load pointcloud_to_laserscan/CloudToScan openni_manager" respawn="true">
    <param name="output_frame_id" value="/camera_depth_frame"/>
    <!-- heights are in the (optical?) frame of the kinect -->
    <param name="min_height" value="-0.025"/>
    <param name="max_height" value="0.025"/>
    <remap from="cloud" to="/cloud_throttled"/>
    <remap from="scan" to="/narrow_scan"/>
  </node>    
</launch>

However, nothing is being published on turtlebot_node/sensor_state and it outputs the following error messages:

Covariance specified for measurement on topic wheelodom is zero
filter time older than odom message buffer
2015-10-26 13:05:49 -0500 received badge  Notable Question (source)
2015-10-26 13:05:49 -0500 received badge  Popular Question (source)
2015-06-22 01:03:44 -0500 marked best answer Compare Gmapping map with Ground Truth

I need to find a way of quantitatively comparing a map generated by SLAM_gmapping with the original map (.pgm) used for the stage simulation. I would use this to compare the accuracy of different mapping techniques. I have considered using an image comparison tool (I tried GraphicsMagick), but this comes with some problems. First, the scale of the saved map (rosrun map_server map_saver) is different from the one of the original map. Secondly, the positions of both maps are different. Hence, I would need to superimpose both images exactly using Gimp before comparing them, which is far from precise. Would anyone have any suggestions as to how to achieve my goal? I would either need a reliable way of rescaling the slam map or an independent algorithm to compare them... I have never studied image processing, so this is no easy task for me!

2015-05-29 13:23:57 -0500 marked best answer Navigating using RGBDSLAM

Has anyone used RGBDSLAM for navigation and/or obstacle avoidance? If yes, are there any available packages? I was thinking of combining RGBDSLAM with the explore package, but I might not have enough experience yet to program it myself.

2014-11-24 06:55:16 -0500 received badge  Famous Question (source)
2014-09-05 06:18:33 -0500 received badge  Self-Learner (source)
2014-06-24 19:08:48 -0500 received badge  Taxonomist
2014-06-03 16:25:19 -0500 received badge  Notable Question (source)
2014-05-05 09:02:26 -0500 received badge  Nice Answer (source)
2014-04-20 13:42:58 -0500 marked best answer Fuerte Explore package in a real environment problem (again)

I created my own Explore package to be used in the real world. My package is basically identical to Explore_stage (http://www.ros.org/wiki/explore) with a few modifications to the XML, yaml and launch files, and altered to use gmapping as its map. Moreover, I have changed explore.cpp according to the 2 TODO comments. My modified package can be found here: https://github.com/LadyZayin/explore

Explore works well on Stage (I receive many warnings, but it works). In the real world, the robot stops moving after exploring for a small while; it wanders across half of the room for some time (ranging from 10 seconds to 5 minutes), then it stops. If I wait for several minutes, it sometimes restarts moving for a few seconds, then stops again. I receive many of the following warning in the terminal: [ WARN] [1370547349.514586524]: Entropy has not been updated. Loop closure opportunities may be ignored. I don't know if both problems are related.

Any ideas?

2014-04-20 13:41:52 -0500 marked best answer Explore package on Gazebo & Turtlebot

I have managed to use the explore package (frontier based exploration) with stage without problem. Now, I would like to use it with Gazebo and in the real world. I am using robots similar to the Turtlebot (Create base + IMU + Asus camera). I have tried modifying the explore/stage launch file (see below), but it didn't work (I don't see anything in the Rviz map, and the robot doesn't move). How can I fix this?

[Edit] Here is the Wiki for the explore package: http://www.ros.org/wiki/explore

[Edit 2] Basically, this url shows what I want to do, but with the PR2 instead of the Turtlebot. I tried following his steps, but I still get no movement in Gazebo and no map in Rviz. http://answers.ros.org/question/33590/map-resolution-issue-between-explore-and-pr2_2dnav_slam/

[Edit 3] Here is the original explore_stage launch file and its rostopic list output:

<launch>
  <master auto="start"/>
  <param name="/use_sim_time" value="true"/>
  <node pkg="stage" type="stageros" name="stage" args="$(find stage)/world/willow-erratic.world" respawn="false" output="screen"/>
  <node pkg="gmapping" type="slam_gmapping" name="gmapping" output="screen">
    <remap from="scan" to="base_scan" />
    <param name="inverted_laser" value="false" />
    <param name="maxUrange" value="30.0" />
    <param name="particles" value="30" />
    <param name="delta" value="0.10" />
    <param name="xmin" value="-15.0" />
    <param name="xmax" value="15.0" />
    <param name="ymin" value="-15.0" />
    <param name="ymax" value="15.0" />
    <param name="angularUpdate" value="0.5" />
    <param name="linearUpdate" value="1.0" />
    <param name="map_update_interval" value="1.0" />
    <param name="resampleThreshold" value="0.3" />
    <param name="llsamplerange" value ="0.05" />
    <param name="llsamplestep" value ="0.05" />
    <param name="lasamplerange" value ="0.05" />
    <param name="lasamplestep" value ="0.05" />
  </node>
  <include file="$(find explore_stage)/move.xml" />
  <include file="$(find explore_stage)/explore_slam.xml" />

</launch>

OUTPUT:
    /base_pose_ground_truth
    /base_scan
    /clock
    /cmd_vel
    /explore/explore_costmap/inflated_obstacles
    /explore/explore_costmap/obstacles
    /explore/explore_costmap/parameter_descriptions
    /explore/explore_costmap/parameter_updates
    /explore/explore_costmap/robot_footprint
    /explore/explore_costmap/unknown_space
    /explore/explore_planner/NavfnROS_costmap/inflated_obstacles
    /explore/explore_planner/NavfnROS_costmap/obstacles
    /explore/explore_planner/NavfnROS_costmap/robot_footprint
    /explore/explore_planner/NavfnROS_costmap/unknown_space
    /explore/explore_planner/plan
    /explore/loop_closure_planner/NavfnROS_costmap/inflated_obstacles
    /explore/loop_closure_planner/NavfnROS_costmap/obstacles
    /explore/loop_closure_planner/NavfnROS_costmap/robot_footprint
    /explore/loop_closure_planner/NavfnROS_costmap/unknown_space
    /explore/loop_closure_planner/plan
    /explore/map
    /gmapping/entropy
    /map
    /map_metadata
    /move_base/NavfnROS/NavfnROS_costmap/inflated_obstacles
    /move_base/NavfnROS/NavfnROS_costmap/obstacles
    /move_base/NavfnROS/NavfnROS_costmap/robot_footprint
    /move_base/NavfnROS/NavfnROS_costmap/unknown_space
    /move_base/NavfnROS/plan
    /move_base/TrajectoryPlannerROS/cost_cloud
    /move_base/TrajectoryPlannerROS/global_plan
    /move_base/TrajectoryPlannerROS/local_plan
    /move_base/TrajectoryPlannerROS/parameter_descriptions
    /move_base/TrajectoryPlannerROS/parameter_updates
    /move_base/cancel
    /move_base/current_goal
    /move_base/feedback
    /move_base/global_costmap/inflated_obstacles
    /move_base/global_costmap/obstacles
    /move_base/global_costmap/parameter_descriptions
    /move_base/global_costmap/parameter_updates
    /move_base/global_costmap/robot_footprint
    /move_base/global_costmap/unknown_space
    /move_base/goal
    /move_base/local_costmap/inflated_obstacles
    /move_base/local_costmap/obstacles
    /move_base/local_costmap/parameter_descriptions
    /move_base/local_costmap/parameter_updates
    /move_base/local_costmap/robot_footprint
    /move_base/local_costmap/unknown_space
    /move_base/parameter_descriptions
    /move_base/parameter_updates
    /move_base/result
    /move_base/status
    /move_base_simple/goal
    /odom
    /rosout
    /rosout_agg
    /tf
    /visualization_marker
    /visualization_marker_array

[Edit 4] I modified the launch file and made some progress. Now, I can accurately see the gmapping map in Rviz. However, there are two issues. First, Rviz displays the explore map, but it's blank (ignore the camera height ... (more)

2014-04-20 13:40:52 -0500 marked best answer Octomap visualization doesn't display anything - rgbdslam

I have the same problem as described here: http://answers.ros.org/question/53228/rgbdslam-cannot-produce-octomap/. However, when I execute rostopic echo /rgbdslam/batch_clouds, a long list of integers is outputted so I assume this is working. I don't understand why octomap viewer only contains an empty blue cube when I try to load the octomap I saved. How can I fix this?

Edit: I have attached a screenshot of the rxgraph: Rxtgraph

By the way, I get this output when saving the octomap, but I don't see /octomap_binary in the graph. Is that the issue?

rosrun octomap_server octomap_saver test2.bt
[ INFO] [1369321237.790118097]: Requesting the map from /octomap_binary...
[ INFO] [1369321237.809273887]: Map received, saving to test2.bt

Edit 2: I just found this topic: http://answers.ros.org/question/9965/how-to-get-octomap-to-store-data-sent-by-rgbdslam/. I downloaded Octomap using apt-get install; do I need another version?

Edit 3: This is the output I get from launching openni:

SUMMARY
========

PARAMETERS
 * /camera/depth/rectify_depth/interpolation
 * /camera/depth_registered/rectify_depth/interpolation
 * /camera/disparity_depth/max_range
 * /camera/disparity_depth/min_range
 * /camera/disparity_depth_registered/max_range
 * /camera/disparity_depth_registered/min_range
 * /camera/driver/depth_camera_info_url
 * /camera/driver/depth_frame_id
 * /camera/driver/depth_registration
 * /camera/driver/device_id
 * /camera/driver/rgb_camera_info_url
 * /camera/driver/rgb_frame_id
 * /rosdistro
 * /rosversion

NODES
  /camera/depth/
    metric (nodelet/nodelet)
    metric_rect (nodelet/nodelet)
    points (nodelet/nodelet)
    rectify_depth (nodelet/nodelet)
  /camera/rgb/
    debayer (nodelet/nodelet)
    rectify_color (nodelet/nodelet)
    rectify_mono (nodelet/nodelet)
  /
    camera_base_link (tf/static_transform_publisher)
    camera_base_link1 (tf/static_transform_publisher)
    camera_base_link2 (tf/static_transform_publisher)
    camera_base_link3 (tf/static_transform_publisher)
    camera_nodelet_manager (nodelet/nodelet)
  /camera/
    disparity_depth (nodelet/nodelet)
    disparity_depth_registered (nodelet/nodelet)
    driver (nodelet/nodelet)
    points_xyzrgb_depth_rgb (nodelet/nodelet)
    register_depth_rgb (nodelet/nodelet)
  /camera/ir/
    rectify_ir (nodelet/nodelet)
  /camera/depth_registered/
    metric (nodelet/nodelet)
    metric_rect (nodelet/nodelet)
    rectify_depth (nodelet/nodelet)

core service [/rosout] found
process[camera_nodelet_manager-1]: started with pid [20137]
process[camera/driver-2]: started with pid [20138]
process[camera/rgb/debayer-3]: started with pid [20166]
[ INFO] [1369429911.881946647]: Initializing nodelet with 4 worker threads.
process[camera/rgb/rectify_mono-4]: started with pid [20203]
process[camera/rgb/rectify_color-5]: started with pid [20225]
process[camera/ir/rectify_ir-6]: started with pid [20280]
process[camera/depth/rectify_depth-7]: started with pid [20355]
process[camera/depth/metric_rect-8]: started with pid [20425]
process[camera/depth/metric-9]: started with pid [20459]
process[camera/depth/points-10]: started with pid [20515]
process[camera/register_depth_rgb-11]: started with pid [20541]
process[camera/depth_registered/rectify_depth-12]: started with pid [20561]
process[camera/depth_registered/metric_rect-13]: started with pid [20621]
process[camera/depth_registered/metric-14]: started with pid [20647]
process[camera/points_xyzrgb_depth_rgb-15]: started with pid [20667]
process[camera/disparity_depth-16]: started with pid [20728]
process[camera/disparity_depth_registered-17]: started with pid [20757]
process[camera_base_link-18]: started with pid [20815]
process[camera_base_link1-19]: started with pid [20834]
process[camera_base_link2-20]: started with pid [20852]
process[camera_base_link3-21]: started with pid [20907]
[ERROR] [1369429921.870903205]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/compressedDepth/set_parameters]
[ERROR] [1369429921.918984524]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/compressed/set_parameters]
[ERROR] [1369429921.962493901]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/theora/set_parameters]

However, the GUI is listening ... (more)

2014-04-20 13:39:57 -0500 marked best answer Problem with turtlebot bringup minimal on Fuerte

I'm following the Turtlebot tutorial http://www.ros.org/wiki/turtlebot_bringup/Tutorials/groovy/TurtleBot%20Bringup. I am attempting to run the command:

roslaunch turtlebot_bringup minimal.launch

However, I get the following error:

Traceback (most recent call last):
  File "/opt/ros/fuerte/stacks/xacro/xacro.py", line 35, in <module>
    xacro.main()
  File "/opt/ros/fuerte/stacks/xacro/src/xacro.py", line 554, in main
    process_includes(doc, os.path.dirname(sys.argv[1]))
  File "/opt/ros/fuerte/stacks/xacro/src/xacro.py", line 193, in process_includes
    filename = eval_text(elt.getAttribute('filename'), {})
  File "/opt/ros/fuerte/stacks/xacro/src/xacro.py", line 409, in eval_text
    results.append(handle_extension(lex.next()[1][2:-1]))
  File "/opt/ros/fuerte/stacks/xacro/src/xacro.py", line 397, in handle_extension
    return eval_extension("$(%s)" % s)
  File "/opt/ros/fuerte/stacks/xacro/src/xacro.py", line 53, in eval_extension
    return substitution_args.resolve_args(str, resolve_anon=False)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 203, in resolve_args
    resolved = _find(resolved, a, args, context)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 139, in _find
    return resolved[0:idx-len(arg)] + r.get_path(args[0]) + resolved[idx:]
  File "/usr/lib/pymodules/python2.7/rospkg/rospack.py", line 164, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
rospkg.common.ResourceNotFound: create_description
ROS path [0]=/opt/ros/fuerte/share/ros
ROS path [1]=/opt/ros/fuerte/share
ROS path [2]=/opt/ros/fuerte/stacks
ROS path [3]=/home/bennie/fuerte_workspace
while processing /home/bennie/fuerte_workspace/turtlebot-master/turtlebot_bringup/launch/includes/_robot.launch:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/fuerte/stacks/xacro/xacro.py '/home/bennie/fuerte_workspace/turtlebot-master/turtlebot_description/robots/create_circles_asus_xtion_pro.urdf.xacro'] returned with code [1]. 

Param xml is <param command="$(arg urdf_file)" name="robot_description"/>

Note that I am simply using a Create base and not an actual Turtlebot. The thing is that I was able to run the above command without problem before I upgrated Ubuntu (12.04) with:

sudo apt-get update
sudo apt-get dist-upgrade

I tried the following (http://answers.ros.org/question/57161/turtlebot_bringup-error-invalid-param-tag/) to fix my problem, but it didn't work. Any suggestions? Thanks!

2014-04-20 13:39:36 -0500 marked best answer Rosmake openni_camera on fuerte fails

I'm trying to make the openni_camera-fuerte-devel package, but it fails. Here is the output:

[ rosmake ] rosmake starting...                                                 
[ rosmake ] Packages requested are: ['openni_camera-fuerte-devel']              
[ rosmake ] Logging to directory /home/2010/bleona4/.ros/rosmake/rosmake_output-20130514-105639
[ rosmake ] Expanded args ['openni_camera-fuerte-devel'] to:
['openni_camera-fuerte-devel']
[rosmake-0] Starting >>> roslang [ make ]                                       
[rosmake-1] Starting >>> rosservice [ make ]                                    
[rosmake-2] Starting >>> rosbuild [ make ]                                      
[rosmake-1] Finished <<< rosservice  No Makefile in package rosservice          
[rosmake-0] Finished <<< roslang  No Makefile in package roslang                
[rosmake-3] Starting >>> roslib [ make ]                                        
[rosmake-1] Starting >>> roscpp [ make ]                                        
[rosmake-0] Starting >>> rospy [ make ]                                         
[rosmake-2] Finished <<< rosbuild  No Makefile in package rosbuild              
[rosmake-2] Starting >>> rosconsole [ make ]                                    
[rosmake-0] Finished <<< rospy  No Makefile in package rospy                    
[rosmake-3] Finished <<< roslib  No Makefile in package roslib                  
[rosmake-1] Finished <<< roscpp  No Makefile in package roscpp                  
[rosmake-2] Finished <<< rosconsole  No Makefile in package rosconsole          
[rosmake-2] Starting >>> smclib [ make ]                                        
[rosmake-0] Starting >>> message_filters [ make ]                               
[rosmake-1] Starting >>> dynamic_reconfigure [ make ]                           
[rosmake-1] Finished <<< dynamic_reconfigure ROS_NOBUILD in package dynamic_reconfigure
[rosmake-1] Starting >>> bond [ make ]                                          
[rosmake-3] Starting >>> pluginlib [ make ]                                     
[rosmake-2] Finished <<< smclib ROS_NOBUILD in package smclib                   
[rosmake-0] Finished <<< message_filters  No Makefile in package message_filters
[rosmake-0] Starting >>> std_msgs [ make ]                                      
[rosmake-2] Starting >>> geometry_msgs [ make ]                                 
[rosmake-1] Finished <<< bond ROS_NOBUILD in package bond                       
[rosmake-1] Starting >>> bondcpp [ make ]                                       
[rosmake-2] Finished <<< geometry_msgs  No Makefile in package geometry_msgs    
[rosmake-2] Starting >>> sensor_msgs [ make ]                                   
[rosmake-3] Finished <<< pluginlib ROS_NOBUILD in package pluginlib             
[rosmake-3] Starting >>> rostest [ make ]                                       
[rosmake-0] Finished <<< std_msgs  No Makefile in package std_msgs              
[rosmake-1] Finished <<< bondcpp ROS_NOBUILD in package bondcpp                 
[rosmake-1] Starting >>> nodelet [ make ]                                       
[rosmake-0] Starting >>> common_rosdeps [ make ]                                
[rosmake-1] Finished <<< nodelet ROS_NOBUILD in package nodelet                 
[rosmake-1] Starting >>> nodelet_topic_tools [ make ]                           
[rosmake-2] Finished <<< sensor_msgs  No Makefile in package sensor_msgs        
[rosmake-3] Finished <<< rostest  No Makefile in package rostest                
[rosmake-1] Finished <<< nodelet_topic_tools ROS_NOBUILD in package nodelet_topic_tools
[rosmake-1] Starting >>> image_transport [ make ]                               
[rosmake-3] Starting >>> test_nodelet [ make ]                                  
[rosmake-1] Finished <<< image_transport ROS_NOBUILD in package image_transport 
[rosmake-1] Starting >>> polled_camera [ make ]                                 
[rosmake-1] Finished <<< polled_camera ROS_NOBUILD in package polled_camera     
[rosmake-3] Finished <<< test_nodelet ROS_NOBUILD in package test_nodelet       
[rosmake-0] Finished <<< common_rosdeps ROS_NOBUILD in package common_rosdeps   
[rosmake-0] Starting >>> camera_calibration_parsers [ make ]                    
[rosmake-0] Finished <<< camera_calibration_parsers ROS_NOBUILD in package camera_calibration_parsers
[rosmake-0] Starting >>> camera_info_manager [ make ]                           
[rosmake-0] Finished <<< camera_info_manager ROS_NOBUILD in package camera_info_manager
[rosmake-0] Starting >>> openni_camera-fuerte-devel [ make ]                    
[ rosmake ] Last 40 linesenni_camera-fuerte-devel... [ 1 Active 25/26 Complete ]
{-------------------------------------------------------------------------------
  [rosbuild] Building package openni_camera-fuerte-devel
  [rosbuild] Including /opt/ros/fuerte/share/rospy/rosbuild/rospy.cmake
  [rosbuild] Including /opt/ros/fuerte/share/roscpp/rosbuild/roscpp.cmake
  [rosbuild] Including /opt/ros/fuerte/share/roslisp/rosbuild/roslisp.cmake
  -- checking for module 'libopenni'
  --   package 'libopenni' not found
  MSG: gencfg_cpp on:OpenNI.cfg
  Finding dependencies for /home/2010/bleona4/fuerte_workspace/openni_camera-fuerte-devel/cfg/OpenNI.cfg
  ***********************************************************************************
  load_module did not return. Unable to determine dependencies for file listed above.
  ***********************************************************************************
  Traceback (most recent call last):
    File "/opt/ros/fuerte/stacks/dynamic_reconfigure/cmake/gendeps", line 64, in <module>
      imp.load_module("__main__", f, srcfile, ('.cfg', 'U', 1))
    File "/home/2010/bleona4/fuerte_workspace/openni_camera-fuerte-devel/cfg/OpenNI.cfg", line 4, in <module>
      import roslib; roslib.load_manifest(PACKAGE)
    File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/launcher.py", line 62, in load_manifest
      sys.path = _generate_python_path(package_name, _rospack) + sys.path
    File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/launcher.py", line 93, in _generate_python_path
      m = rospack.get_manifest(pkg)
    File "/usr/lib/pymodules/python2.7/rospkg ...
(more)
2014-04-20 13:39:14 -0500 marked best answer Stage controller tutorial on Groovy

I'm trying to follow the stage controller tutorial here: ros.org/wiki/stage/Tutorials/IntroductiontoStageControllers.

However, I run into the following errors:

err: Model type laser not found in model typetable (/tmp/buildd/ros-groovy-stage-1.6.7/debian/ros-groovy-stage/opt/ros/groovy/stacks/stage/build/stage/libstage/world.cc CreateModel)

err: Unknown model type laser in world file. (/tmp/buildd/ros-groovy-stage-1.6.7/debian/ros-groovy-stage/opt/ros/groovy/stacks/stage/build/stage/libstage/world.cc CreateModel)

I replaced laser with ranger in roomba-wander.world and got the following warnings:

warn: lookup of model name roomba.ranger:1: no matching name (/tmp/buildd/ros-groovy-stage-1.6.7/debian/ros-groovy-stage/opt/ros/groovy/stacks/stage/build/stage/libstage/world.cc GetModel)

warn: Model roomba.ranger:1 not found (/tmp/buildd/ros-groovy-stage-1.6.7/debian/ros-groovy-stage/opt/ros/groovy/stacks/stage/build/stage/libstage/model.cc GetChild)
Segmentation fault (core dumped)

Now I read this topic, answers.ros.org/question/33973/stage-error-in-fuerte/, but the solutions are for fuerte. I tried them anyway, but it doesn't work. Is there a way to fix this? Or is there another similar tutorial that I could follow? I need to simulate a navigating robot (I will use an icreate), and eventually implement SLAM.

2014-04-20 13:39:12 -0500 marked best answer ROS_PACKAGE_PATH environment

Hi,

I'm trying to set my ROS_PACKAGE_PATH variable permanently. I appended the following line to the etc/environment file: ROS_PACKAGE_PATH="/home/zayin/catkin_ws/src:/opt/ros/groovy/share:/opt/ros/groovy/stacks". Then, I logged out and back in. However, when I type echo $ROS_PACKAGE_PATH in the terminal, I get /opt/ros/groovy/share:/opt/ros/groovy/stacks, which is the initial setting. What have I forgotten to do? Thanks!

2014-04-20 06:55:32 -0500 marked best answer Turtlebot sensor_state all 0s with Gazebo on Fuerte

I am trying to access the bumps wheeldrops sensor from the Turtlebot sensor_state topic. However, the bump sensor is never activated. In fact, if I execute rostopic echo /turtlebot_node/sensor_state, all the sensor_state values are permanently set to 0. In addition, I noticed that the /odom Twist parameter remains 0 even when the robot is moving. Here is my launch file:

<launch>
    <arg name="use_sim_time" default="true"/>
    <arg name="gui" default="true"/>

    <!-- start gazebo with an empty plane -->
    <param name="/use_sim_time" value="true" />

    <node name="gazebo" pkg="gazebo" type="gazebo" args="-u $(find turtlebot_gazebo)/worlds/1box.world" respawn="false" output="screen"/>

    <include file="$(find turtlebot_gazebo)/launch/robot.launch"/>

    <!-- start gui -->
    <group if="$(arg gui)">
        <node name="gazebo_gui" pkg="gazebo" type="gui" respawn="false" output="screen"/>
    </group> 

</launch>

And here is the simple program that is running as a node:

#include <ros/ros.h>
#include <turtlebot_node/TurtlebotSensorState.h>
#include <geometry_msgs/Twist.h>
#include <ros/rate.h>
#include <iostream>
#include <stdio.h>                        

using namespace std;    
uint8_t bumper;

void bumperCallback(const turtlebot_node::TurtlebotSensorState::ConstPtr& msg);

int main (int argc, char** argv){       

    ros::Time start, end;
    ros::init(argc, argv, "bumper");    
    ros::NodeHandle nodeH;  
    ros::Rate loop_rate(10); //10 Hz.
    geometry_msgs::Twist twist;

    //Bumper subscriber.
    ros::Subscriber bumperSub = nodeH.subscribe<turtlebot_node::TurtlebotSensorState>("/turtlebot_node/sensor_state", 1000, bumperCallback);
    //Moving.
    ros::Publisher movingPub = nodeH.advertise<geometry_msgs::Twist>("cmd_vel", 1000);

    //Twist set to navigate forward.
    double forwardSpeed = 0.15;
    twist.linear.x = forwardSpeed; 
    twist.linear.y = 0;
    twist.linear.z = 0;
    twist.angular.x = 0; 
    twist.angular.y = 0; 
    twist.angular.z = 0;

    start = ros::Time::now(); //Time when the robot starts moving.
    while(ros::ok){
        if(bumper != 0){
            end = ros::Time::now(); //Time when robot bumped into a wall.
            ROS_INFO("BOOM OUCH");

        }
        else{ //Go forward until the robot bumps into a wall.
            ROS_INFO("Going forward");      
            movingPub.publish(twist);
        }
        loop_rate.sleep();
        ros::spinOnce();
    }

    return 0;
}

//Fetch the sensor state containing the bumper state.
void bumperCallback(const turtlebot_node::TurtlebotSensorState::ConstPtr& msg){

    bumper = msg->bumps_wheeldrops;
    ROS_INFO("Bumper is %d .", bumper);     
}

I verified that Gazebo is indeed publishing on "/turtlebot_node/sensor_state" and that my own node is subscribed to it. How can I solve this problem? I've researched similar topics, but I don't see anything wrong with my files based on these.

Note that the following warning is being reported by Gazebo, but I think it's irrelevant:

Warning [RaySensor.cc:206] ranges not constructed yet (zero sized)

[Edit] I just noticed these additional errors. I had not seen them before because the RaySensor warning is being displayed thousands of times. Gazebo seems to be running fine, though...

Warning [parser.cc:348] Gazebo SDF has no gazebo element
Warning [parser.cc:291] DEPRECATED GAZEBO MODEL FILE
On July 1st, 2012, this formate will no longer by supported
Convert your files using the gzsdf command line tool
You have been warned!

Error [ColladaLoader.cc:1392] No Opaque set
[ INFO] [1375303568.841199057]: imu plugin missing <serviceName>, defaults to /default_imu
[ INFO] [1375303568.842760080]: imu plugin missing <xyzOffset>, defaults to 0s
[ INFO] [1375303568 ...
(more)
2014-04-20 06:55:00 -0500 marked best answer Comparing two Occupancy Grids

I am attempting to find a way of comparing two stage occupancy grids: the first one is generated by slam gmapping (published on the "map" topic) and the second comes from the rasterization of the stage floor model (myModel.Rasterize(myRasterArray, this->width, this->height, cellwidth, cellheight) - see this page http://rtv.github.io/Stage/classStg_1_1Model.html). I managed to access both of these grids, and I generated both grids with the same height, width and resolution. Now, I am wondering if both grids possess the same coordinates; for instance, would comparing the cells at position (1,2) correspond to the same cell on both maps? If not, is there a way of superimposing both grids?

[Edit] I printed the occupancy grids obtained, and the two aren't even oriented in the same way (see picture here http://tinypic.com/r/x2ph5l/5). #1 is the slam map, #2 is the map extracted from the Stage model, and the image to the right is the bitmap used to build the Stage map (yes, a smiley face!). Note that the robot is wandering inside the white area, which explains why image #1 is just the inside of the smiley face. All in all, I need to find a way of aligning the grids... Please help?

[Edit2] I'm attempting to use the debug option of mapstitch which is supposed to "save the current_stitch.pgm and current_map.pgm, i.e. the stitched maps and the current map as seen on /map.", but there is nothing being outputted. Is this a bug? Here's my launch file:

<launch>
  <master auto="start"/>
  <param name="/use_sim_time" value="true"/>  
  <node pkg="mapstitch" type="ros_mapstitch" name="ros_mapstitch">    
    <param name="debug" value ="true" />
  </node>  
</launch>
2014-04-20 06:54:56 -0500 marked best answer Callback with "this"

I'm trying to call a callback function with a "this" pointer in the following way:

ros::Subscriber sub = node.subscribe("map_metadata", 1, &Obstacle::metaDataCallback, this);

The Callback function is:

//Get the occupancy grid metadata.
void Obstacle::metaDataCallback(const nav_msgs::MapMetaData::ConstPtr& msg) {       
        this->width = msg->width;
        this->height = msg->height;
        this->resolution = msg->resolution;
}

When I try to print the width, height and resolution of "this" after the callback has returned, the values are always 0 (as when initialized). However, I know they should be 288, 288 and 0.1 respectively. Why aren't the parameters properly stored in "this"? How can I make it so?