Skip to content

System Launch

Matty Wolfson edited this page Feb 11, 2021 · 29 revisions

Safety

The cart while having been tested through a variety of conditions, and safety being well accounted for. There are some general rules the robotics monitor in the back of the cart should follow.

  1. Eyes should always be scanning the surroundings as well as RViz to ensure that pathing is correct, and you should be looking ahead of the RViz path to ensure there are no potential issues.
  2. If a problem or obstacle is found to be a potential hindrance, the person next to the keys and manual/autonomous switch should be ready to switch to manual mode or shut down the cart.
  3. If the cart ever stops for any reason at all, whether its a temporary stop for an obstacle, or a permanent stop due to bad localization health, it should always be assumed the cart can continue operating at any time so long as the code is running.
  4. Everyone in the cart should be ready to communicate any obstacle to each other, it should not be assumed a safety driver or operator is aware of everything at all times.

Pre-Launch

This includes instructions for a total systems launch, not just the ROS components

1. Turn on the power inverter. Small button on side. Press for one second.

2. Ensure all devices are connected(plug-in order does not matter) including:

  • USB Hub:
    • Arduino (USB)
    • Stereo Camera (USB)
    • Frontal Camera (USB)
    • DAC for Microphone and Speaker (USB)
    • Bose Soundlink (USB)
    • Touch Screen (USB)
  • 3D Lidar (Ethernet Cable) : Make sure power is plugged into the velodyne board, and the ethernet cable from the board to the laptop.
  • HDMI Cable: Touch Screen Monitor should come to life
  • Laptop Power (if needed)

3. Navigate to the ~/catkan_ws/src/ai_navigation directory

4. Run ./run.sh and enter sudo password

5. Turn WiFi back on and connect to network

6. Migrate over to terminal session that gives warning "Port in Use. Would you like to choose a different port" and reply 'y'.

7. Check for autonomous modes on switches

8. 2D Pose in RViz

9. Navigate

General Launching

If you simply want to run the cart in the real world, with no care for parameters. There is a bash file that exists for such purpose. This bash file can be found in the root directory of ai-navigation it is called "run.sh". Link to location: Here You can disregard step 1 of the "Fine-tuned Parameter Launching" below and continue with step 2.

Fine-tuned Parameter Launching

1. Run the system code using (Note the arguments below): `roslaunch cart_control navigation.launch

There are three arguments that can be used for simple launching:

  • realtime [default = true]-Runs the system in a state of readiness for real-world function. Note if being used for real-world testing the argument endpoints must be turned on as well.
  • simulator [default = false]-Runs the system in a state of readiness for simulator testing. Launches Gazebo.
  • replay [default = false]-Runs the system in a state for bag replaying.

Additional arguments for fine tuned running:

  • endpoints [default = true] (if true, the carts endpoints will launch(motor endpoint, pose tracking, etc))
    • networking [default = true] (if true the ros_client will launch)
    • health [default = false] (if true the health monitor will launch)
    • voice [default = true] (if true the speech_recognition will launch)
    • pose [default = true] (if true the pose tracking will launch)
    • obstacle_detection [default = false] (if true the obstacle_detection will launch)
    • visualize_pose [default = false] (if true the stereo camera image stream will be displayed in a window while running)

2. Once RViz and the Code are running, you should proceed to give a pose estimate through RViz of the orientation and positioning of the cart. **You should be very careful about this if the localization is not proper you may get dangerous and unexpected behavior. In theory the cart_health_monitor node should be actively monitoring the localization to ensure good health. However do not rely on this to always be reliable. **

3. A location needs to be given to the cart to go to, one possible way is to publish a point in RViz. A destination can also be given by publishing a Point message (rostopic pub) to the /destination_request topic. There is also the network functionality in which the Networking team's app can send a destination to the cart system. This is published under the /gps_request topic with a LatLong message.

4. Once a destination has been requested the global_planner node will determine a route to take to get to the destination, the cart should start driving. Closely monitor RViz to ensure the cart is following the determined route correctly and the localization is correct.

Prepared/Example Launches

It is recommended the launch files are analyzed to help with understanding the launch parameters.

General running of the entire system in the real world:

  • Use run.sh in the root directory of 'ai-navigation' OR

  • roslaunch cart_control navigation.launch health:=1

    • health:=1 is there to run the cart health monitor, if the cart health monitor ends up being pesky, just do without the argument.
  • If you wanted to run in the Gazebo simulator, you would do: roslaunch cart_control navigation.launch simulator:=0

  • If you wanted to replay and watch a bag file: roslaunch cart_control navigation.launch replay:=1

  • If you wanted to run the cart but don't want the pose tracking running: roslaunch cart_control navigation.launch pose:=0