Raya Documentation Raya Documentation
  • Discord
  • Github
  • Developers Center
Raya Documentation

Getting Started

  • Introduction
  • Install Ra-Ya SDK
  • Create your first app (Robot)
  • Create your first app (Simulation)

RaYa Python library

  • Raya Python Library
    • Controllers
      • Sensors
        • Synchronous methods
          • get_all_sensors_values()
          • get_sensors_list()
          • get_sensor_value()
          • check_sensor_in_range()
          • create_threshold_listener()
          • create_boolean_listener()
        • Exceptions
      • LiDAR
        • Synchronous methods
          • get_laser_info()
          • check_obstacle()
          • create_obstacle_listener()
          • get_raw_data()
        • Exceptions
        • Enumerations
      • Cameras
        • Synchronous methods
          • create_color_frame_listener()
          • is_camera_enabled()
          • available_color_cameras()
          • delete_listener()
        • Asynchronous methods
          • enable_color_camera()
          • disable_color_camera()
          • get_next_frame()
          • enable_streaming()
          • disable_streaming()
        • Exceptions
      • Leds
        • Synchronous methods
          • get_groups()
          • get_colors()
          • get_animations()
          • get_max_speed()
        • Asynchronous methods
          • animation()
          • set_color()
          • turn_off_group()
          • turn_off_all()
        • Exceptions
        • Feedbacks
        • Enumerations
      • Motion
        • Synchronous methods
          • is_moving()
          • check_last_exception()
          • get_last_result()
        • Asynchronous methods
          • move_linear()
          • rotate()
          • await_until_stop()
          • set_velocity()
          • cancel_motion()
        • Exceptions
        • Feedbacks
        • Enumerations
      • Comunication
        • Synchronous methods
          • mqtt_remove_subscription()
        • Asynchronous methods
          • mqtt_create_subscription()
          • mqtt_publish_message()
        • Exceptions
      • Sounds
        • Synchronous methods
          • get_predefined_sounds()
          • is_playing()
          • is_recording()
        • Asynchronous methods
          • cancel_sound()
          • record_sound()
          • play_sound()
        • Handlers
          • SoundData Object
        • Exceptions
        • Feedbacks
      • Status
        • Asynchronous methods
          • get_raya_status()
          • get_available_arms()
          • get_localization_status()
          • get_manipulation_status()
          • get_battery_status()
        • Exceptions
        • Enumerations
      • Arms
        • General Methods
          • Asynchronous Methods
            • get_last_result()
            • check_last_exception()
        • Get Arm/Joint Information
          • Synchronous Methods
            • get_arms_list()
            • get_groups_list()
            • get_joints_list()
            • get_joints_limits()
            • get_joint_type()
            • get_arm_state()
          • Asynchronous Methods
            • get_predefined_poses_list()
            • get_predefined_trajectories_list()
            • get_current_joints_position()
            • get_current_pose()
            • get_current_joint_position()
        • Arm/Joint Checking Methods
          • Synchronous Methods
            • is_linear_joint()
            • is_rotational_joint()
          • Asynchronous Methods
            • is_pose_valid()
            • is_pose_valid_q()
            • is_joints_position_valid()
            • is_any_arm_in_execution()
            • are_checkings_in_progress()
        • Manage Predefined Data
          • manage_predefined_trajectory()
          • manage_predefined_pose()
        • Execute Arm Movements
          • set_predefined_pose()
          • set_joints_position()
          • set_joint_position()
          • set_pose()
          • set_pose_q()
          • execute_predefined_trajectory()
          • execute_predefined_poses_array()
          • execute_joints_positions_array()
          • execute_poses_array()
          • execute_poses_array_q()
          • set_multi_arm_pose()
        • Gripper
          • gripper_cmd()
        • Cancel Execution
          • cancel_execution()
        • Objects
          • add_attached_object()
          • remove_attached_object()
          • add_collision_object()
          • remove_collision_object()
        • Constraints
          • add_constraints()
          • remove_constraints()
        • Tools
          • convert_orientation()
        • Exceptions
        • Feedbacks
        • Enumerations
      • UI
        • Asynchronous methods
          • display_split_screen()
          • display_modal()
          • display_input_modal()
          • display_screen()
          • display_interactive_map()
          • display_action_screen()
          • display_choice_selector()
          • display_animation()
          • show_animation()
          • open_link()
          • open_video()
          • open_conference()
          • open_interacty()
        • Exceptions
        • Enumerations
      • Interactions
        • Synchronous methods
          • get_interactions()
          • interaction_running()
        • Asynchronous methods
          • wait_interaction_finished()
          • play_interaction()
        • Exceptions
        • Feedbacks
      • Manipulation
        • Synchronous methods
          • is_manipulation()
        • Asynchronous methods
          • cancel_manipulation()
          • wait_manipulation_finished()
          • place_object_with_reference()
          • place_object_with_tag()
          • clean_arms_status()
          • pick_object_point()
          • pick_object()
          • place_object_with_point()
        • Exceptions
        • Feedbacks
      • CV
        • Asynchronous methods
          • get_available_models()
          • enable_model()
          • disable_model()
          • disable_all_models()
          • train_model_folder_path()
          • train_model()
          • delete_face()
        • Handlers
          • find_tags()
          • get_current_predictions()
          • get_predictions_once()
          • set_predictions_callback()
          • set_img_predictions_callback()
          • find_objects()
          • cancel_find_objects()
          • get_objects_names()
        • Exceptions
      • Navigation
        • zones & locations
          • asynchronous_methods
            • save_zone()
            • order_zone_points()
            • get_sorted_zone_point()
            • delete_zone()
            • get_zone_center()
            • get_zones_list()
            • get_zones()
            • get_locations()
            • get_locations_list()
            • save_location()
            • delete_location()
            • get_location()
        • navigation
          • asynchronous_methods
            • enable_speed_zones()
            • disable_speed_zones()
            • update_robotic_footprint()
            • cancel_navigation()
            • navigate_close_to_position()
            • go_to_angle()
            • navigate_to_zone()
            • navigate_to_location()
            • navigate_to_position()
            • get_position()
            • is_in_zone()
            • update_current_nav_goal()
            • get_costmap()
            • check_path_to_goal()
            • get_status()
            • await_until_stop()
          • synchronous_methods
            • get_last_result()
            • check_last_exception()
        • maps & position
          • asynchronous_methods
            • update_map()
            • download_map()
            • set_map()
            • is_mapping()
            • is_localized()
            • get_map()
            • get_list_of_maps()
            • start_mapping()
            • continue_mapping()
            • stop_mapping()
            • generate_speed_zones_files()
            • get_current_map()
        • Feedbacks
        • Exceptions
      • NLP
        • Asynchronous methods
          • tts_play_text()
          • stt_transcribe_from_mic()
          • stt_transcribe_from_file()
          • tts_set_provider()
          • stt_set_provider()
        • Exceptions
        • Feedbacks
      • Fleet
        • Synchronous methods
          • set_msgs_from_fleet_callback()
        • Asynchronous methods
          • request_action()
          • finish_task()
          • update_app_status()
          • open_camera_stream()
        • Exceptions
        • Enumerations
    • General Enumerations
    • Exceptions
    • Tools
      • Finite States Machine Module
        • Simple FSM
        • Multiple FSM
    • Examples
      • Cameras
        • cameras_get_image_frame
        • cameras_list
      • Computer Vision
        • cv_face_detection
        • cv_list_models
        • cv_object_detection
        • cv_object_segmentator
        • cv_tags
      • Chest Interface
        • chest_animation_lottie
        • chest_animation
        • chest_choice
        • chest_game
        • chest_keyboard
        • chest_play_video
      • FSM
        • fsm_multiple
        • fsm_simple
      • Health Monitoring
        • health_monitor
        • health_play_predefined_retry
      • Miscellaneous
        • async_task
        • get_args
        • hello_world
      • Navigation
        • motion
        • nav_get_current_position
        • nav_get_info
        • nav_to_location
        • nav_update_footprint
        • nav_update_map
      • Sensors and Peripherals
        • leds
        • lidar_scan
        • sensors_chest_button_listener
        • sensors_list
        • sensors_print
      • Skills
        • skill_fsm_simple
        • skill_fsm_run_by_methods
        • skill_run_complete
      • Sound
        • sound_play_custom
        • sound_play_predefined_multiple_actions
        • sound_play_predefined
        • sound_record_and_play
        • sound_record_save
    • Skills
      • Skills Overview
      • Skill Development Guide
      • Skill Usage Guide
      • Skills Examples
        • skill_fsm_simple
        • skill_fsm_run_by_methods
        • skill_run_complete

Robots

  • Robots Availables
    • Gary
      • LEDs colors
      • Sensors

Unlimited Robotics SDK

  • Unlimited Robotics SDK
    • Commands
      • Simulator
      • Init
      • Scan
      • Connect
      • Run
      • Update
      • Kill
      • Command
      • Tools
      • Skills
        • Install
        • Install_deps
  1. Docs
  2. Raya Python Library
  3. Examples
  4. Navigation Examples
  5. nav_to_location
Edit on GitHub

nav_to_location¶


Overview¶

The nav_to_location application allows the user to select a predefined location from an interactive terminal menu and initiates navigation to the selected point.

The application first retrieves and displays the current map and localization status of the robot before proceeding.

Execution¶

The application can be executed using:

python3 nav_to_location/ --auto-run

Inputs¶

  • No mandatory command-line arguments.

  • The application automatically retrieves the map and localization status.

  • The user selects a target location from an interactive menu.

Outputs¶

  • Log messages indicating the current map and localization status.

  • Robot navigation to the location selected.

Behavior¶

  • The application retrieves and displays the robot’s current localization state and the active map.

  • If the robot is localized, the available locations are displayed in an interactive menu.

  • The user selects a location, and the robot begins navigation to the chosen point.

  • If the robot is not localized, the application exits with a message prompting the user to localize the robot.

  • Once a location is selected, the robot begins navigation.

Example Output¶

### Case 1: Robot is localized and navigates to a selected location

# python3 nav_to_location/ --auto-run
[INFO] [timestamp] [pyraya.nav_to_location]: Auto running the app
[INFO] [timestamp] [pyraya.nav_to_location]: Setup
[INFO] [timestamp] [pyraya.nav_to_location]: Robot localized using Bogota_Office__minigary.101 map
[INFO] [timestamp] [pyraya.nav_to_location]: Current navigation status: 2(IDLE)
[INFO] [timestamp] [pyraya.nav_to_location]:
[WARNING] [timestamp] [pyraya.nav_to_location]: Navigating to home location
[INFO] [timestamp] [pyraya.nav_to_location]: App finish

### Case 2: Robot is not localized

# python3 nav_to_location/ --auto-run
[INFO] [timestamp] [pyraya.nav_to_location]: Auto running the app
[INFO] [timestamp] [pyraya.nav_to_location]: Setup
[INFO] [timestamp] [pyraya.nav_to_location]: Robot is not localized. Please localize it and try again.
[INFO] [timestamp] [pyraya.nav_to_location]: App finish

Key Notes¶

  • If the robot is not localized, it cannot proceed with navigation.

  • The interactive menu allows the user to select a destination from predefined locations.

  • The application ensures the robot only navigates if it has a valid localization state.

  • If the map does not contain any predefined locations, an error message appears in the console, and the application exits.

← nav_get_info nav_update_footprint  →

Page contents

  • nav_to_location
    • Overview
    • Execution
    • Inputs
    • Outputs
    • Behavior
    • Example Output
    • Key Notes
  • About Us
  • Contact
  • Legal

Wagtail Sphinx Theme 6.2.0.dev0

© Copyright 2024, Unlimited Robotics