Skip to content

Latest commit

 

History

History
90 lines (69 loc) · 4.2 KB

README.md

File metadata and controls

90 lines (69 loc) · 4.2 KB

nhttc_ros

mushr_nhttc_ros is a multi-agent decentralized navigation system meant to take in waypoints in space and time from a higher level planner and follow them while avoiding collisions with other agents. It is built on top of the NHTTC system. Below are install and run instructions, but the best way to get started is to checkout this tutorial. Detailed run instructions should be in a tutorial, this serves as a quick reference.

Authors:

Stefan Layanto

Sidharth Talia

Arnav Thareja

(Order not indicative of contribution)

Installation:

(Assuming catkin_ws exists) cloning the repo files:

$ cd catkin_ws/src
$ git clone --branch devel https://github.com/naughtyStark/nhttc_ros.git
$ cd nhttc_ros
$ git submodule init
$ git submodule update --recursive

Install python requirements (assuming you are already in the nhttc_ros directory):

$ cd ~/catkin_ws/src/nhttc_ros
$ pip install -r requirements.txt

Compile:

Compile using catkin_make:

$ cd ~/catkin_ws
$ catkin_make

Running:

If everything compiles, you should be ready to try out the simulation example. Launch the nhttc_demo.launch:

$ roslaunch nhttc_ros nhttc_demo.launch

In a new tab, open rviz (wait for 10-15 seconds if this is the first time you're launching nhttc_demo.launch):

$ rviz -d ~/catkin_ws/src/nhttc_ros/rviz/nhttc.rviz

Run the route publisher node to publish some waypoints for the cars to follow.

$ rosrun nhttc_ros route_publisher

API

The nhttc_ros wrapper has the following parameters:

car_name (string):

The name assigned to the car (can be any string but prefer car{index number})

solver_time (int):

The maximum time in milliseconds for which the solver is allowed to run

max_ttc (float):

The maximum time-to-collision used by the solver: any agents that have a time to collision larger than this will not be considered in the cost function

carrot_goal_ratio (float):

The ratio of the carrot-goal/lookahead distance to the turning radius. value of 1 means that the lookahead distance is the same as the turning radius.

obey_time" value(boolean):

Set to true if the car is supposed to adhere to the time coordinate of the waypoints (as in, to arrive at a waypoint at a given time and not before/after).

allow_reverse (boolean):

Set to true if the car is allowed to go in reverse.

Publishers

Topic Type Description
/car_name/mux/ackermann_cmd_mux/input/navigation ackermann_msgs/AckermannDriveStamped steering and speed control of car corresponding to car_name.
/car_name/cur_goal geometry_msgs/PoseStamp topic on which current waypoint is published.
/car_name/time_goal geometry_msgs/PoseStamp waypoint being used for timing purposes.

Subscribers

Topic Type Description
/car1/car_pose geometry_msgs/PoseStamp position of car 1
...
/car{n}/car_pose geometry_msgs/PoseStamp position of car {n}
/car_name/waypoints geometry_msgs/PoseArray waypoint array corresponding to car_name. The z axis coordinate represents the time difference between 2 waypoints.

Note that the z axis data in /car/waypoints topic represents the time difference between two consecutive waypoints in a unitless fashion, and the number should be pre-multiplied by 0.001 before publishing (so that the visualization on rviz does not look elevated). 1 unit of time here is equal to (distance between two waypoints/expected speed of the agent). If the car moves at 0.5 m/s and the distance between two waypoints is 1 meter, then 1 unit of time would equal to 2 seconds.