Commit 280b9952 authored by Svetlana's avatar Svetlana

Readme update

parent d0b40269
## Install ROS *TorcsClient* is a C++ application that connects to Torcs and receives images via shared memory (FreeImage library is used to read and store images).
### Versions *EMAM2RosCpp* <https://github.com/EmbeddedMontiArc/EMAM2RosCpp> and *EMAM2RosMsg* <https://github.com/EmbeddedMontiArc/EMAM2RosMsg> are used to generate ROS code from EmbeddedMontiArc.
Ubuntu 16.04
ROS lunar
Install libarmadillo-dev package
sudo ln -s /usr/include/armadillo /usr/include/armadillo.h
Follow instructions on http://wiki.ros.org/lunar/Installation/Ubuntu ## Prerequisites
Follow instructions to create package on http://wiki.ros.org/ROS/Tutorials/CreatingPackage * Ubuntu 16.04
* ROS lunar
We use RosWorkspace/ as the ROS workspace directory and RosWorkspace/src/torcs2 as the package directory example. ## TorcsClient
Generate sources via EMAMRosCpp * Compile torcs:
Copy sources into created package src directory (RosWorkspace/src/torcs2/src) ..* Install dependencies: `libopenal-dev libalut-dev libplib-dev libvorbis-dev`
..* cd to torcs directory and run: `./configure && make`
* Install `libfreeimage-dev`
## ROS
* libarmadillo-dev package
`sudo ln -s /usr/include/armadillo /usr/include/armadillo.h`
* Follow ROS installation instructions on <http://wiki.ros.org/lunar/Installation/Ubuntu>
* Follow instructions to create a package on <http://wiki.ros.org/ROS/Tutorials/CreatingPackage>
We use `RosWorkspace/` as the ROS workspace directory and `RosWorkspace/src/torcs2` as the package directory example.
* Generate sources via EMAMRosCpp
* Copy sources into created package src directory (RosWorkspace/src/torcs2/src)
Find string: Find string:
# add_executable(${PROJECT_NAME}_node src/torcs2_node.cpp) `# add_executable(${PROJECT_NAME}_node src/torcs2_node.cpp)`
in the RosWorkspace/src/torcs2/CMakeLists.txt file, uncomment and change to: in the RosWorkspace/src/torcs2/CMakeLists.txt file, uncomment and change to:
add_executable(${PROJECT_NAME} src/torcs2.cpp) `add_executable(${PROJECT_NAME} src/torcs2.cpp)`
Find and uncomment in the same file: Find and uncomment in the same file:
```
target_link_libraries(${PROJECT_NAME}_node target_link_libraries(${PROJECT_NAME}_node
${catkin_LIBRARIES} ${catkin_LIBRARIES}
) )
```
and remove _node suffix to have: and remove _node suffix to get:
```
target_link_libraries(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES} ${catkin_LIBRARIES}
) )
```
Run catkin_make and catkin_make install as described in tutorial. * Run `catkin_make` and `catkin_make install` as described in tutorial.
Check that package is now available: Check that package is now available: `rospack list | grep torcs`
rospack list | grep torcs
Run node with the package: * Run node with the package: `rosrun torcs torcs`
rosrun torcs torcs
Have fun!
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment