Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioscap committed Feb 3, 2022
1 parent 40df49f commit 60dc9c9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# rp_project 2d robot simulator
#### fabio scaparro

A ROS node that implements a 1 robot simulator. Reads the map from the map_server. Reads /cmd_vel, produces /odom /tf and /base_scan. To run this program, you need a ROS installation with the basic packages:

- tf2
- geometry_msgs
- nav_msgs
- roscpp
- sensor_msgs

To use the graphical interface you also need SDL2 (https://www.libsdl.org/index.php). On Ubuntu you can do:
> sudo apt install libsdl2-dev
To build the package clone it in a catkin workspace and compile it with catkin_make.

To run the package you need to:
- run roscore

either
- source the workspace where the package is and run "rosrun rp_project rp_project_sim2d"

or
- run "./{the catkin ws}/devel/lib/rp_project/rp_project_sim2d"

The program will start and will be waiting for a message on the topic /map. To provide a map run the map_server in another terminal. Currently this package supports only maps in "trinary" mode. (see http://wiki.ros.org/map_server#Value_Interpretation). A map that works is in the folder maps/ (aula41). After receiving the map the simulator will start and you will be able to control the robot through twist messages in the /cmd_vel topic.

To modify the size of the robot you can set the "/robot_radius" parameter before executing the node. You can also modify the parameters of the laser scan by modifying the constructor in sim2d/laser.h (other methods not yet implemented).

0 comments on commit 60dc9c9

Please sign in to comment.