# RNS FAQ

### Mapping

1. **Q: No map is loaded even after the successful installation of Seirios RNS**\
   **A:** Use the ***Mapping*** feature to create your first map. Please refer to the [mapping instructions](https://docs.movel.ai/new-collection/seirios-rns/product-features/core/mapping) in the above sections in full detail to start mapping
2. **Q: Unable to do mapping, it stuck in loading the logo**\
   **A:** Check your LiDAR data points, if the data points are above 3000, you have to downsample it. \
   You can downsample it by configuring your LiDAR if possible, otherwise, you can use the [Laser Scan Sparsifier](http://wiki.ros.org/laser_scan_sparsifier) ROS Package.
3. **Q: Can I continue mapping from the map?**\
   **A:** Yes, please edit to your docker-compose.yaml (usually placed at \~/catkin\_ws/movel\_ai/), under **seirios-frontend** section, add this environment: \
   `MULTI_SESSION: "true"`
4. **Q: How to do 3D Mapping?**\
   **A:** Set your 3D Lidar published pointcloud topic name to **/lslidar\_c16/lslidar\_point\_cloud,** make sure your 3d lidar frame is linked to parent frame base\_link.\
   Make sure you also changed the docker-compose.yaml as well\
   1\. Open docker-compose.yaml (usually place in \~/catkin\_ws/movel\_ai folder), \
   2\. under the **seirios-frontend** and **seirios-backend** section, add these environment below: **THREE\_D\_MAPPING: "true"**\
   **SHOW\_3D\_VIEW: "true"**

### Localization

1. #### Q: When loading the map from the Library, the status is stuck at 'Halting Localization'.

   **A**: Loading a map from the library requires laser scan data. Check your robot is publishing laser scan data by running a `rostopic echo /scan`. (Replace /scan with your robot topic.)
2. #### Q: Unable to localize the map

   **A**: Check your tf tree to make sure there is only 1 unbroken connection from map to base\_link. `rosrun rqt_tf_tree rqt_tf_tree`.

   Also, please check your AMCL node (for 2D) is running and publishing.\
   `rosnode list | grep amcl` and `rosnode info /amcl`.
3. **Q: When start localization, no scan data shows on the UI**

   **A**: Check your tf, the transformations between scan tf to base\_link should be not tf static. Please use broadcast a transformation instead of static transformation publisher. (see number 7 point 1 in the [Hardware Integration](https://docs.movel.ai/new-collection/seirios-rns/documentation/hardware-related) section.
4. **Q: The autocorrection on the localization process seems so slow, how can I make it faster?**

   **A**: Please try to tune the parameters of the localization as well,&#x20;

   Follow these steps:

   1. Navigate to the following directory in your robot's workspace: `/home/<USER>/catkin_ws/movel_ai/config/movel/config/`.
   2. Open the parameter file named `amcl.yaml` (If amcl is current your localization algorithm).
   3. Verify that the inflation layer is defined correctly within this file.
   4. Try to reduce some values below:

      1. `update_min_d` : Translational movement required before performing a filter update (in meters).
      2. `update_min_a` : Rotational movement required before performing a filter update (in rad).
      3. `resample_interval`: Number of filter updates required before resampling.

      You can see more about details the parameters on this [ros wiki](http://wiki.ros.org/amcl).
   5. Please reload the map to apply the changes.

### Navigation

1. **Q: When start navigation, “bot faced obstacle” keep shows on the UI even on the actual environment no obstacle exist.**\
   **A:** It is because the robot tracks the unknown space, the unknown space will be detected as an invalid area. You can change that by navigating to `~/catkin_ws/movel_ai/config/movel/config/costmap_common_params.yaml`\
   set all the **track\_unknown\_space** to **false**
2. **Q: I want to enable the obstacle avoidance using Trail task. But when running Trail Task, the robot failed to replan to avoid the obstacle and get back on the track.**\
   **A:** Navigate to: \
   `~/catkin_ws/movel_ai/config/task_supervisor/config/task_supervisor.yaml`\
   under **multi\_floor\_navigation\_handler** section, set the set **stop\_at\_obstacle\_override** parameter to **false**, and **restart your seirios (down the docker-compose and up -d again)**
3. #### Q: How to change the Local Planner? What Local Planner fits my use case?

   A: You can choose the local planner you want to use for the robot by following the steps below:

   1. Go into the folder `/home/<USER>/catkin_ws/movel_ai/config/movel/config/`
   2. In the parameter file **move\_base\_params.yaml**, change the `base_local_planner` to the local planner that you want to use.&#x20;

      For my recommendation, if you want an optimal local planner and you don’t worry about the backward movement of the robot, you can go with **TEB (Time Elastic Band)** as your local planner.&#x20;

      But if you want a local planner that is designed to follow the global plan closely (which shows on the UI), you can go with **Pebble Planner** as your Local Planner.

      You can just choose your local planner by uncommenting the line **base\_local\_planner**.
4. **Q: I am using PebbleLocalPlanner. How to add deceleration before reach the goal, to make it smoother navigation?**\
   **A:** Navigate to the this file:\
   `~/catkin_ws/movel_ai/config/movel/config/base_local_planner_param.yaml`\
   Under PebbleLocalPlanner section, modify these parameters below:\
   \- **decelerate\_goal: false**\
   Controls whether the robot should **decelerate** as it approaches the goal. \
   -**decelerate\_each\_waypoint: false**\
   Determines whether the robot should decelerate when reaching each waypoint (pebble) along its path. \
   **true**: The robot decelerates at each waypoint, making navigation smoother but slower.\
   **false**: The robot maintains speed between waypoints for quicker movement.
5. **Q: How can I make the robot navigate through narrow paths?**

   **A:** To enable your robot to navigate through narrow paths, you need to adjust the configuration settings related to obstacle avoidance. Follow these steps:

   1. Navigate to the following directory in your robot's workspace: `/home/<USER>/catkin_ws/movel_ai/config/movel/config/`.
   2. Open the parameter file named `costmap_common_params.yaml`.
   3. Verify that the inflation layer is defined correctly within this file.
   4. To facilitate navigation through narrow spaces, you'll need to reduce the inflation radius. The `inflation_radius` is measured in meters and determines how much the map inflates obstacle cost values. To make your robot more capable of navigating through narrow passages, consider setting the `inflation_radius` to a value that represents the width of your robot, plus some additional space.

      By adjusting the `inflation_radius` parameter, you can fine-tune your robot's ability to navigate tight spaces and ensure smoother movement through narrow paths.

      You can see the pictures below to explain how the `inflation_radius` affecting the navigation path width.
   5. Please reload the map to apply the changes.

<div align="left"><figure><img src="https://3011557067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkBtlBrwlCbBifOLd-h-887967055%2Fuploads%2FuradftRvgm8h9f0ob6MN%2Fimage.png?alt=media&#x26;token=4ee94f15-a6a4-4ebf-af83-fd03b1a76e89" alt=""><figcaption><p>inflation_radius value set to 0.2</p></figcaption></figure></div>

<figure><img src="https://3011557067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkBtlBrwlCbBifOLd-h-887967055%2Fuploads%2FKCwk4EnCzpotIzH64qUC%2Fimage.png?alt=media&#x26;token=b2e4c0e2-3cbd-4118-b5a4-8fb954751448" alt=""><figcaption><p>inflation_radius value set to 0.35</p></figcaption></figure>

*In the picture above, the red cells represent obstacles in the costmap.* For the robot to avoid collision, the footprint of the robot should never intersect a red cell.<br>

1. **Q: How do I run my bash script through the UI?**\
   **A:** You can use [Aux Task](https://docs.movel.ai/new-collection/product-features/supplementary-features/auxiliary-tasks#auxiliary-tasks), see more detail about how to create aux task in [this](https://docs.movel.ai/new-collection/product-features/supplementary-features/auxiliary-tasks#auxiliary-tasks) link.
2. **Q: I have created the aux task, but when I enable the aux task, it's still not triggering the task / bash script.**\
   **A:** Set your bash script become executable, by running: **sudo chmod +x \[file\_name].sh**, also please make sure that the full path will be **/home/movel/.config/movel/aux\_tasks/\[file\_name].sh** (full path directory for auxiliary task inside Seirios-RNS Docker), and please make sure the script is in **\~/catkin\_ws/movel\_ai/aux\_tasks** folder.

### REST API

1. **Q: How do I integrate the Seirios RNS to external system?**\
   **A:** You can use our[ REST API](https://docs.movel.ai/new-collection/seirios-rns/documentation/rest-apis).
2. **Q: How to use MOVEL AI REST API?**\
   **A:** Movel AI REST API documentation can be access on this link Swagger UI (go to <http://localhost:8000/api-docs/swagger/>), you can use it for reference.
3. **Q: There's a token for each API, how do I get the token?**\
   **A:** You can see the **/user/token** API, the value must be:\
   `username: "admin"`\
   `password: "admin"`\
   (if you changed the password, please use your password)\
   After that, it will shows the response that contains Token for authentication. You can use that token for any other API. By default, the Token will be expired within one month, you can get the update the token after get expired, or you can update it everytime the program starts, or call the function.
4. **Q: I am going to run the task (waypoint, trail, etc), it needed id of the task, how do I get it?**\
   **A:** There's an API with /\<task>**/all** (/all suffix for everytask, such as waypoint, trail, aux task, etc), you can execute that to get all the information of the task.\
   Then you can find the \_id, by matching your task name, you can use that id to run the task.
