User Tools

Site Tools


getting_started:ros

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
getting_started:ros [2017/11/20 17:28] – [Using ROS through EEROS HAL] grafgetting_started:ros [2018/08/31 14:46] gehrig
Line 8: Line 8:
  
 ===== Using ROS through EEROS HAL ===== ===== Using ROS through EEROS HAL =====
-EEROS can communicate with the underlying hardware through its [[eeros_architecture:hal:start|]]. When using this, you need a special wrapper library (see ). +EEROS can communicate with the underlying hardware through its [[eeros_architecture:hal:start|]]. When using this, you need a special wrapper library (see [[eeros_architecture:hal:hardware_libraries|]]). 
 [{{ :getting_started:roshal.png?350 |//Connect with ROS topics through the HAL//}}] [{{ :getting_started:roshal.png?350 |//Connect with ROS topics through the HAL//}}]
  
 The EEROS HAL signals can be comprised of digital or analog inputs or outputs. They are specified in a JSON file. \\ The EEROS HAL signals can be comprised of digital or analog inputs or outputs. They are specified in a JSON file. \\
-If you want to test your application with a [[http://gazebosim.org/|Gazebo]] simulation, you can define your inputs and outputs as ROS topics to connect your application with the simulation. For this no hardware is necessary. To use your application with hardware, you can use any of the available [[eeros_architecture:hal:hardware_libraries|]], for example, use the wrapper library \textit{comedi-eeros} or \textit{flink-eeros}. +If you want to test your application with a [[http://gazebosim.org/|Gazebo]] simulation, you can define your inputs and outputs as ROS topics to connect your application with the simulation. For this no hardware is necessary. To use your application with hardware, you can use any of the available [[eeros_architecture:hal:hardware_libraries|]]. By choosing the proper JSON file, you can easily switch between real hardware and simulation\\ 
-If you adapt the *.json file correctlyyour application should now run on hardware with real encoders and motors without any problems+It is also possible to use ROS-topics alongside real hardware. You could determine a motor position by reading an encoder and set a control value for a motor. In parallel, you could publish the same values to ROS topics to visualize the state of the robot with [[http://wiki.ros.org/rviz|rviz]] (if you have a model of your robot) or you could monitor the values with a ROS tool like [[http://wiki.ros.org/rqt|rqt]].
-It is also possible to use ROS-topics alongside real hardware. +
-You can use \textit{comedi-eeros} to read an encoder and set a control value for a motor. +
-At the same time, you can publish the same values to ROS topics to visualize the state of the robot with \textit{rviz(if you have a model of your robot) or you can monitor the values with a ROS tool like ''\textit{rqt}'' and display them in a graph with \textit{Multiplot} or as numbers with \textit{TopicMonitor}. +
-With \textit{Multiplot} you can also store the values in a text file+
  
 ===== Preparations and Building ===== ===== Preparations and Building =====
Line 24: Line 20:
 The same applies for building the EEROS library with ROS support and for building an EEROS application with ROS support. \\ The same applies for building the EEROS library with ROS support and for building an EEROS application with ROS support. \\
 IMPORTANT If an integrated development environment such as ''kdevelop'' or ''Qt Creator'' is used, the IDE has to be started from a terminal after the ''setup.bash'' script has run. IMPORTANT If an integrated development environment such as ''kdevelop'' or ''Qt Creator'' is used, the IDE has to be started from a terminal after the ''setup.bash'' script has run.
 +
 +=== Building the EEROS library with ROS ===
 +If you build the library with cmake, make sure you use the -DUSE_ROS=TRUE switch.
 +An example of a cmake call could look like this:\\
 +''cmake -DCMAKE_INSTALL_PREFIX="$install_dir" -DUSE_ROS=TRUE ..''
 +
 +
 +=== Building an EEROS application with ROS functionality ===
  
 The CMAKE file for the EEROS application using ROS has to be expanded as follows: The CMAKE file for the EEROS application using ROS has to be expanded as follows:
getting_started/ros.txt · Last modified: 2023/02/09 12:04 by ursgraf