In this first assignment we were asked to control an holonomic robot within a 2d space with a simple 2d simulator, Stage. The simulator can be launched by executing the command:
rosrun stage_ros stageros $(rospack find myfirstassignment)/world/exercise.world
Once I have created a new ROS package, two ROS nodes have been developed. For writing the code I have chosen to adopt C++ programming language.
The first node, random_movement.cpp, implement:
- A ROS publisher
- A ROS subscriber
- A ROS client
The second node random_service.cpp, implement a server whose aim is to compute 2 random numbers
It is visible in the srv folder and it manages the request/reply of the custom service
By running the following command:
rosrun rqt_graph rqt_graph
it is possible to show a dynamic graph, depicting what is going on within the System.
The documentation of this project, obtained by means of DoxyGen is visible, within the docs folder
Federico Civetta– s4194543 – [email protected]
Distributed under none licence
- Firstly, create a folder named "myfirstassignment"
- Within the aforementioned folder, open the terminal and run
git clone https://github.com/fedehub/myfirstassignment/
- Secondly, start the master in background, by running:
roscore &
- Then, to launch the simulation environment, please open a new shell tab and run the command
rosrun stage_ros stageros $(rospack find myfirstassignment)/world/exercise.world
- To launch the firs node, open another shell tab and digit:
rosrun myfirstassignment rand_ser
- To launch the second node, open another shell tab and digit:
rosrun myfirstassignment rand_mov
So far, the robot should appear in the simulation environment and once it reaches a target, it should move toward another direction, looking for the next one.
-
0.1.0
-
The first proper release
-
0.0.1
-
Work in progress
- Fork it (https://github.com/fedehub/myfirstassignment/fork)
- Create your feature branch (git checkout -b feature/fooBar)
- Commit your changes (git commit -am 'Add some fooBar')
- Push to the branch (git push origin feature/fooBar)
- Create a new Pull Request