nav2d troubles for params config

asked 2017-10-12 08:56:57 -0500

gerson_n gravatar image

updated 2017-10-12 12:14:45 -0500

Hi everyone,

A few days ago, I decided to use nav2d on my real robot for exploration using SLAM. The thing is, when I see the map on rviz it's very small and after I order the robot start mapping with rosservice call /StartMapping, it starts moving forward and then turns forever.

I think everything is configurated in a good way, but something is missing. I've attached some useful info below in order you can see some inconsistency.

I've already configurated the odometry data which suscribes types messages geometry_msgs/Twist to /cmd_vel topic, and publishes the speeds to /rpm topic. Then another file subscribes to rpm topic and interpret it readings based on odometry. For the kinect I'm using simply use freenect.launch and depth info, and the fake laser scan data publishes to /scan topic. So, I shouldn't have problems with that.

On the other hand, for nav2d I don't have a joystick, so set the orders through rosservice calls. By the way, I'm using tutorial3.launch from the website. The params used are the following:

Operator.yaml

# Maximum velocity command the operator will send to the robot (in m/s)
max_velocity: 0.25 #1.0 [m/s] por defecto
# If set to true, the selected best direction is published as a GridCells-Message
publish_route: true #falso por defecto
# The way is assumed to be free when there is no obstacle within this range (in meter)
max_free_space: 2.0 #5.0 [m] por defecto
safety_decay: 0.95 # (0.95) 0.95 por defecto 
# The importance weights of the 3 action values
distance_weight: 1 #1 por defecto
safety_weight: 2 #1 por defecto
conformance_weight: 1 #1 por defecto
continue_weight: 0 #1 por defecto

ros.yaml

###########################################################
# Defines topics services and frames for all modules
### TF frames #############################################
laser_frame: camera_link
robot_frame: base_link
odometry_frame: odom
offset_frame: offset
map_frame: map
### ROS topics ############################################
map_topic: map
laser_topic: scan
### ROS services ##########################################
map_service: static_map

navigator.yaml

# Inflation params used for path planning
map_inflation_radius: 0.5 # (1.0) 1.0 [m] por defecto
robot_radius: 0.3 # ojo que está repetido en costmap.yaml
# Tolerance in target position for MoveToPosition2D (meter)
navigation_goal_distance: 2.0 # 1.0 [m] por defecto
# Toleranvce in target heading for MoveToPosition2D (radians)
navigation_goal_angle: 1.0 # 1.0 [rad] por defecto
# Distance at which to turn off obstacle avoidance (meter)
  navigation_homing_distance: 4.0 # 3.0 [m] por defecto
# Find new exploartion target when in range of current one (meter)
exploration_goal_distance: 3.0  # 3.0 [m] por defecto
# Strategy MinPos
min_target_area_size: 1.0
visualize_frontiers: true
#################### Agregados de nav2d_navigator#####################
robot_id: 1 # ID único para los robots en equipo
map_frame: map # map por defecto
#robot_frame: robot # por defecto. Comentado por tener nombre cambiado en ros.yaml
#map_service: get_map # por defecto. Comentado por también aparecer en ros.yaml y con nombre cambiado
exploration_strategy: NearestFrontierPlanner # Mismo nombre por defecto, no estaba
min_replanning_period: 3.0 # 3.0 [s] por defecto
min_replanning_period: 1.0 # 1.0 [s]´

mapper.yaml

### Mapper ################################################
grid_resolution: 0.025 # (0.1)
range_threshold: 10.0
map_update_rate: 5 ...
(more)
edit retag flag offensive close merge delete

Comments

Great gerson_n, btw, what's materials do you refer when you change the parameters? Looking forward the result of you test.

l_a_den gravatar image l_a_den  ( 2017-10-13 03:49:59 -0500 )edit

It was the encoder's pulse I'm using, which are these https://www.pololu.com/product/2827 . And also I'm currently trying to enhance the motors performance. By the moment, only low velocities seems work. I sucessfully achieve Startmapping call, and Exploration works, but I've made few tests so far.

gerson_n gravatar image gerson_n  ( 2017-10-13 09:56:07 -0500 )edit

By now I'm not secure if this really works, because I'm testing it. And regarding to the parameters I refered, were the ones inside controlador_de_motor.ino

gerson_n gravatar image gerson_n  ( 2017-10-13 09:59:36 -0500 )edit