Robotics StackExchange | Archived questions

2D nav goal doesn't work

I have been given the task to fix this custom robot to have the ability to use the 2D nav goal

this has been a project handed down student to student

There is an existing roslaunch that activates all the nodes however 2D nav goal does not work

Here is the roslaunch code and keyboard teleop as well I was told that I need to launch both to achieve 2D nav goal

yinht@yinht-desktop:~$ roslaunch hostbot hostbot.launch
... logging to /home/yinht/.ros/log/475151fc-ef50-11e6-a633-00215cbf656c/roslaunch-yinht-desktop-12680.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://yinht-desktop:42810/

SUMMARY
========

PARAMETERS
 * /amcl/gui_publish_rate: 10.0
 * /amcl/kld_err: 0.05
 * /amcl/kld_z: 0.99
 * /amcl/laser_lambda_short: 0.1
 * /amcl/laser_likelihood_max_dist: 2.0
 * /amcl/laser_max_beams: 30
 * /amcl/laser_model_type: likelihood_field
 * /amcl/laser_sigma_hit: 0.2
 * /amcl/laser_z_hit: 0.5
 * /amcl/laser_z_max: 0.05
 * /amcl/laser_z_rand: 0.5
 * /amcl/laser_z_short: 0.05
 * /amcl/max_particles: 5000
 * /amcl/min_particles: 500
 * /amcl/odom_alpha1: 0.2
 * /amcl/odom_alpha2: 0.2
 * /amcl/odom_alpha3: 0.8
 * /amcl/odom_alpha4: 0.2
 * /amcl/odom_alpha5: 0.1
 * /amcl/odom_frame_id: odom
 * /amcl/odom_model_type: omni
 * /amcl/recovery_alpha_fast: 0.0
 * /amcl/recovery_alpha_slow: 0.0
 * /amcl/resample_interval: 1
 * /amcl/transform_tolerance: 0.1
 * /amcl/update_min_a: 0.5
 * /amcl/update_min_d: 0.2
 * /arduino/baud: 115200
 * /arduino/port: /dev/ttyUSB0
 * /camera/camera_nodelet_manager/num_worker_threads: 4
 * /camera/depth_rectify_depth/interpolation: 0
 * /camera/driver/auto_exposure: True
 * /camera/driver/auto_white_balance: True
 * /camera/driver/color_depth_synchronization: False
 * /camera/driver/depth_camera_info_url: 
 * /camera/driver/depth_frame_id: camera_depth_opti...
 * /camera/driver/depth_registration: False
 * /camera/driver/device_id: #1
 * /camera/driver/rgb_camera_info_url: 
 * /camera/driver/rgb_frame_id: camera_rgb_optica...
 * /diffusion_tf/angle_std_mean_deviation_deg: 10
 * /diffusion_tf/angular_scale: 1.0
 * /diffusion_tf/base_frame_id: base_link
 * /diffusion_tf/base_width: 0.34
 * /diffusion_tf/linear_scale: 1.0
 * /diffusion_tf/odom_frame_id: odom
 * /diffusion_tf/pos_std_mean_deviation: 0.1
 * /diffusion_tf/publish_tf: True
 * /diffusion_tf/rate: 40
 * /diffusion_tf/vit_ang_std_mean_deviation_deg: 3
 * /diffusion_tf/vit_std_mean_deviation_deg: 1
 * /hokuyo_laser/calibrate_time: False
 * /hokuyo_laser/frame_id: base_laser_link
 * /hokuyo_laser/intensity: False
 * /hokuyo_laser/max_ang: 1.4
 * /hokuyo_laser/min_ang: -1.4
 * /hokuyo_laser/port: /dev/ttyACM0
 * /move_base/TrajectoryPlannerROS/acc_lim_theta: 3.0
 * /move_base/TrajectoryPlannerROS/acc_lim_x: 2.0
 * /move_base/TrajectoryPlannerROS/acc_lim_y: 0.0
 * /move_base/TrajectoryPlannerROS/angular_sim_granularity: 0.025
 * /move_base/TrajectoryPlannerROS/dwa: True
 * /move_base/TrajectoryPlannerROS/escape_vel: -0.05
 * /move_base/TrajectoryPlannerROS/gdist_scale: 0.6
 * /move_base/TrajectoryPlannerROS/heading_lookahead: 0.325
 * /move_base/TrajectoryPlannerROS/heading_scoring: False
 * /move_base/TrajectoryPlannerROS/heading_scoring_timestep: 0.8
 * /move_base/TrajectoryPlannerROS/holonomic_robot: False
 * /move_base/TrajectoryPlannerROS/latch_xy_goal_tolerance: False
 * /move_base/TrajectoryPlannerROS/max_rotational_vel: 0.15
 * /move_base/TrajectoryPlannerROS/max_vel_theta: 0.15
 * /move_base/TrajectoryPlannerROS/max_vel_x: 0.3
 * /move_base/TrajectoryPlannerROS/max_vel_y: 0.0
 * /move_base/TrajectoryPlannerROS/meter_scoring: True
 * /move_base/TrajectoryPlannerROS/min_in_place_vel_theta: 0.5
 * /move_base/TrajectoryPlannerROS/min_vel_theta: -0.15
 * /move_base/TrajectoryPlannerROS/min_vel_x: 0.1
 * /move_base/TrajectoryPlannerROS/min_vel_y: 0.0
 * /move_base/TrajectoryPlannerROS/occdist_scale: 0.1
 * /move_base/TrajectoryPlannerROS/oscillation_reset_dist: 0.05
 * /move_base/TrajectoryPlannerROS/pdist_scale: 0.8
 * /move_base/TrajectoryPlannerROS/prune_plan: True
 * /move_base/TrajectoryPlannerROS/publish_cost_grid_pc: False
 * /move_base/TrajectoryPlannerROS/sim_granularity: 0.025
 * /move_base/TrajectoryPlannerROS/sim_time: 1.0
 * /move_base/TrajectoryPlannerROS/simple_attractor: False
 * /move_base/TrajectoryPlannerROS/vtheta_samples: 20
 * /move_base/TrajectoryPlannerROS/vx_samples: 8
 * /move_base/TrajectoryPlannerROS/vy_samples: 0
 * /move_base/TrajectoryPlannerROS/xy_goal_tolerance: 0.3
 * /move_base/TrajectoryPlannerROS/yaw_goal_tolerance: 0.15
 * /move_base/clearing_rotation_allowed: False
 * /move_base/controller_frequency: 5.0
 * /move_base/global_costmap/footprint: [[0.2, 0.2], [0.2...
 * /move_base/global_costmap/global_frame: /map
 * /move_base/global_costmap/inflation_radius: 0.1
 * /move_base/global_costmap/map_type: costmap
 * /move_base/global_costmap/max_obstacle_height: 0.6
 * /move_base/global_costmap/min_obstacle_height: 0.0
 * /move_base/global_costmap/observation_sources: scan
 * /move_base/global_costmap/obstacle_range: 2.5
 * /move_base/global_costmap/publish_frequency: 5.0
 * /move_base/global_costmap/raytrace_range: 3.0
 * /move_base/global_costmap/resolution: 0.01
 * /move_base/global_costmap/robot_base_frame: /base_link
 * /move_base/global_costmap/rolling_window: False
 * /move_base/global_costmap/scan/clearing: True
 * /move_base/global_costmap/scan/data_type: LaserScan
 * /move_base/global_costmap/scan/expected_update_rate: 0
 * /move_base/global_costmap/scan/marking: True
 * /move_base/global_costmap/scan/topic: /scan
 * /move_base/global_costmap/static_map: True
 * /move_base/global_costmap/transform_tolerance: 1.0
 * /move_base/global_costmap/update_frequency: 3.0
 * /move_base/local_costmap/footprint: [[0.2, 0.2], [0.2...
 * /move_base/local_costmap/global_frame: /odom
 * /move_base/local_costmap/height: 6.0
 * /move_base/local_costmap/inflation_radius: 0.1
 * /move_base/local_costmap/map_type: costmap
 * /move_base/local_costmap/max_obstacle_height: 0.6
 * /move_base/local_costmap/min_obstacle_height: 0.0
 * /move_base/local_costmap/observation_sources: scan
 * /move_base/local_costmap/obstacle_range: 2.5
 * /move_base/local_costmap/publish_frequency: 5.0
 * /move_base/local_costmap/raytrace_range: 3.0
 * /move_base/local_costmap/resolution: 0.07556
 * /move_base/local_costmap/robot_base_frame: /base_link
 * /move_base/local_costmap/rolling_window: True
 * /move_base/local_costmap/scan/clearing: True
 * /move_base/local_costmap/scan/data_type: LaserScan
 * /move_base/local_costmap/scan/expected_update_rate: 0
 * /move_base/local_costmap/scan/marking: True
 * /move_base/local_costmap/scan/topic: /scan
 * /move_base/local_costmap/static_map: False
 * /move_base/local_costmap/transform_tolerance: 1.0
 * /move_base/local_costmap/update_frequency: 3.0
 * /move_base/local_costmap/width: 6.0
 * /move_base/recovery_behavior_enabled: False
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 20.0
 * /robot_state_publisher/use_gui: True
 * /rosdistro: indigo
 * /rosversion: 1.11.19
 * /ticks_meter: 14887.10852
 * /twist_to_motors/base_width: 0.3
 * /use_sim_time: False

NODES
  /camera/
    camera_nodelet_manager (nodelet/nodelet)
    depth_metric (nodelet/nodelet)
    depth_metric_rect (nodelet/nodelet)
    depth_points (nodelet/nodelet)
    depth_rectify_depth (nodelet/nodelet)
    depth_registered_sw_metric_rect (nodelet/nodelet)
    driver (nodelet/nodelet)
    points_xyzrgb_sw_registered (nodelet/nodelet)
    rectify_color (nodelet/nodelet)
    register_depth_rgb (nodelet/nodelet)
  /
    amcl (amcl/amcl)
    arduino (rosserial_python/serial_node.py)
    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)
    diffusion_tf (hostbot/diff_tf.py)
    hokuyo_laser (hokuyo_node/hokuyo_node)
    joint_state_publisher (joint_state_publisher/joint_state_publisher)
    map_server (map_server/map_server)
    move_base (move_base/move_base)
    robot_state_publisher (robot_state_publisher/state_publisher)
    twist_to_motors (hostbot/twist_to_motors.py)

auto-starting new master
process[master]: started with pid [12695]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 475151fc-ef50-11e6-a633-00215cbf656c
process[rosout-1]: started with pid [12708]
started core service [/rosout]
process[robot_state_publisher-2]: started with pid [12726]
process[joint_state_publisher-3]: started with pid [12727]
process[camera/camera_nodelet_manager-4]: started with pid [12728]
process[camera/driver-5]: started with pid [12741]
process[camera/rectify_color-6]: started with pid [12750]
process[camera/depth_rectify_depth-7]: started with pid [12753]
process[camera/depth_metric_rect-8]: started with pid [12763]
process[camera/depth_metric-9]: started with pid [12766]
process[camera/depth_points-10]: started with pid [12778]
process[camera/register_depth_rgb-11]: started with pid [12784]
process[camera/points_xyzrgb_sw_registered-12]: started with pid [12792]
process[camera/depth_registered_sw_metric_rect-13]: started with pid [12798]
process[camera_base_link-14]: started with pid [12814]
process[camera_base_link1-15]: started with pid [12828]
process[camera_base_link2-16]: started with pid [12830]
process[camera_base_link3-17]: started with pid [12834]
process[twist_to_motors-18]: started with pid [12858]
process[diffusion_tf-19]: started with pid [12873]
process[arduino-20]: started with pid [12889]
process[hokuyo_laser-21]: started with pid [12890]
[ INFO] [1486703876.683650057]: Initializing nodelet with 4 worker threads.
process[map_server-22]: started with pid [12901]
process[amcl-23]: started with pid [12917]
process[move_base-24]: started with pid [12927]
[INFO] [WallTime: 1486703877.019547] ROS Serial Python Node
[INFO] [WallTime: 1486703877.039113] Connecting to /dev/ttyUSB0 at 115200 baud
[INFO] [WallTime: 1486703877.057384] /twist_to_motors started
/home/yinht/catkin_ws/src/hostbot/nodes/twist_to_motors.py:42: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.pub_lmotor = rospy.Publisher('lwheel_vtarget', Float32)
/home/yinht/catkin_ws/src/hostbot/nodes/twist_to_motors.py:43: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.pub_rmotor = rospy.Publisher('rwheel_vtarget', Float32)
[INFO] [WallTime: 1486703877.645485] -I- /diffusion_tf started
/home/yinht/catkin_ws/src/hostbot/nodes/diff_tf.py:117: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.odomPub = rospy.Publisher("odom", Odometry)
[ INFO] [1486703877.813928311]: Device "1d27/0601@1/8" found.
Warning: USB events thread - failed to set priority. This might cause loss of data...
[ INFO] [1486703878.819265328]: Loading from pre-hydro parameter style
[ INFO] [1486703878.844982373]: Using plugin "static_layer"
[ INFO] [1486703878.905857764]: Requesting the map...
[ INFO] [1486703879.111162537]: Resizing costmap to 1688 X 1246 at 0.075560 m/pix
[INFO] [WallTime: 1486703879.190570] Note: publish buffer size is 512 bytes
[INFO] [WallTime: 1486703879.190839] Setup publisher on lwheel [std_msgs/Int32]
[INFO] [WallTime: 1486703879.198615] Setup publisher on rwheel [std_msgs/Int32]
[INFO] [WallTime: 1486703879.207442] Note: subscribe buffer size is 512 bytes
[INFO] [WallTime: 1486703879.207722] Setup subscriber on lwheel_vtarget [std_msgs/Float32]
[ INFO] [1486703879.209835098]: Received a 1688 X 1246 map at 0.075560 m/pix
[INFO] [WallTime: 1486703879.213497] Setup subscriber on rwheel_vtarget [std_msgs/Float32]
[ INFO] [1486703879.214881308]: Using plugin "obstacle_layer"
[ INFO] [1486703879.217417037]:     Subscribed to Topics: scan
[ INFO] [1486703879.254006615]: Using plugin "inflation_layer"
[ INFO] [1486703879.453302656]: Loading from pre-hydro parameter style
[ INFO] [1486703879.473070559]: Using plugin "obstacle_layer"
[ INFO] [1486703879.528227213]:     Subscribed to Topics: scan
[ INFO] [1486703879.550666168]: Using plugin "inflation_layer"
[ INFO] [1486703879.651412855]: Created local_planner base_local_planner/TrajectoryPlannerROS
[ INFO] [1486703879.666393325]: Sim period is set to 0.20
[ INFO] [1486703879.989305737]: Recovery behavior will clear layer obstacles
[ INFO] [1486703880.058021442]: Recovery behavior will clear layer obstacles
[ INFO] [1486703880.098148258]: odom received!
[ INFO] [1486704007.223655161]: Starting color stream.
[ INFO] [1486704007.360941073]: using default calibration URL
[ INFO] [1486704007.361014063]: camera calibration URL: file:///home/yinht/.ros/camera_info/rgb_PS1080_PrimeSense.yaml
[ INFO] [1486704007.361111251]: Unable to open camera calibration file [/home/yinht/.ros/camera_info/rgb_PS1080_PrimeSense.yaml]
[ WARN] [1486704007.361143519]: Camera calibration file /home/yinht/.ros/camera_info/rgb_PS1080_PrimeSense.yaml not found.
[ WARN] [1486704925.958951255]: The origin for the sensor at (-121201.08, 376860.81) is out of map bounds. So, the costmap cannot raytrace for it.

    yinht@yinht-desktop:~$ roslaunch rbx1_nav keyboard_teleop.launch 
... logging to /home/yinht/.ros/log/475151fc-ef50-11e6-a633-00215cbf656c/roslaunch-yinht-desktop-15275.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://yinht-desktop:35777/

SUMMARY
========

PARAMETERS
 * /rosdistro: indigo
 * /rosversion: 1.11.19
 * /turtlebot_teleop_keyboard/scale_angular: 0.4
 * /turtlebot_teleop_keyboard/scale_linear: 0.1

NODES
  /
    turtlebot_teleop_keyboard (turtlebot_teleop/turtlebot_teleop_key)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[turtlebot_teleop_keyboard-1]: started with pid [15293]

Control Your Turtlebot!
---------------------------
Moving around:
   u    i    o
   j    k    l
   m    ,    .

q/z : increase/decrease max speeds by 10%
w/x : increase/decrease only linear speed by 10%
e/c : increase/decrease only angular speed by 10%
space key, k : force stop
anything else : stop smoothly

CTRL-C to quit

currently:  speed 0.2   turn 1 

and lastly the rviz launch

yinht@yinht-desktop:~$ rviz
[ INFO] [1486704004.968319012]: rviz version 1.11.14
[ INFO] [1486704004.968367367]: compiled against Qt version 4.8.6
[ INFO] [1486704004.968381905]: compiled against OGRE version 1.8.1 (Byatis)
[ INFO] [1486704005.138209888]: Stereo is NOT SUPPORTED
[ INFO] [1486704005.138490900]: OpenGl version: 3 (GLSL 1.3).
[ INFO] [1486704016.067279606]: Setting goal: Frame:base_link, Position(1.579, 2.176, 0.000), Orientation(0.000, 0.000, 0.904, 0.427) = Angle: 2.260

[ WARN] [1486704479.378661192]: MessageFilter [target=base_link ]: Dropped 100.00% of messages so far. Please turn the [ros.rviz.message_notifier] rosconsole logger to DEBUG for more information.
[ WARN] [1486704479.378694430]: MessageFilter [target=base_link ]:   The majority of dropped messages were due to messages growing older than the TF cache time.  The last message's timestamp was: 1486703879.338835, and the last frame_id was: map
[ WARN] [1486704801.475618740]: Messages of type 1 arrived closer (0.033531427) than the lower bound you provided (0.500000000) (will print only once)

I am sorry if the code isn't showing properly as i'm new to ROS answers

there is also a tendency for the map to just vanish from rviz

I am happt for any help I can get thanks

Asked by Acecryz on 2017-02-10 00:42:24 UTC

Comments

For future reference: to format code with the Preformatted Code button (the one with 101010 on it), select all lines that need to be placed in the code block, then press the button (or use ctrl+k).

Asked by gvdhoorn on 2017-02-10 01:38:00 UTC

Thank you, now I know.

Asked by Acecryz on 2017-02-10 01:43:47 UTC

Answers