/CyberRT

Apollo CyberRT Cmake Build

Primary LanguageC++Apache License 2.0Apache-2.0

Apollo(v7.0.0) Cyber

CyberRT

#1 env

Ubuntu18
sudo apt install libpoco-dev
sudo apt install uuid-dev
sudo apt install libncurses5-dev
// required libpython3.x.so
sudo apt install python3.6-dev 
pip3 install protobuf

#2 build

  1. download
git clone https://github.com/minhanghuang/CyberRT.git
cd CyberRT
  1. export library path

third party(gflag gtest glog fastrtps fastcdr...)

sudo mkdir /opt/cyber
sudo cp -r env/ /opt/cyber/env
// bash 
source /opt/cyber/env/setup.bash

// zsh 
source /opt/cyber/env/setup.zsh
  1. generate protobuf
/opt/cyber/env/bin/protoc -I=cyber/proto/ --cpp_out=cyber/proto --python_out=cyber/proto cyber/proto/*.proto

/opt/cyber/env/bin/protoc -I=cyber/examples/proto/ --cpp_out=cyber/examples/proto cyber/examples/proto/*.proto
  1. build
mkdir build && cd build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
make 
  1. run examples
  • pub/sub

talker

source setup.bash
./cyber/examples/cyber_example_talker

listener

source setup.bash
./cyber/examples/cyber_example_listener
  • server/client

server

source setup.bash
./cyber/examples/cyber_example_server

client

source setup.bash
./cyber/examples/cyber_example_cilent
  • component
source setup.bash
cyber_launch start share/examples/common.launch
./cyber/examples/common_component_example/channel_prediction_writer
./cyber/examples/common_component_example/channel_test_writer

#3 tools

  • channel

list

source setup.bash
cyber_channel list

// The number of channels is:  1
// /apollo/test

echo

source setup.bash
cyber_channel echo /apollo/test

example

more ...

Commands:
	cyber_channel list	list active channels
	cyber_channel info	print information about active channel
	cyber_channel echo	print messages to screen
	cyber_channel hz	display publishing rate of channel
	cyber_channel bw	display bandwidth used by channel
	cyber_channel type	print channel type
  • node
Commands:
	cyber_node list 	List active nodes.
	cyber_node info 	Print node info.
  • service
Commands:
	cyber_service list	list active services
	cyber_service info	print information about active service
  • launch
cyber_launch start share/examples/common.launch
  • monitor
cyber_monitor
  • recorder
Commands: 
  	cyber_recorder info	Show information of an exist record.
	cyber_recorder play	Play an exist record.
	cyber_recorder record	Record same topic.
	cyber_recorder split	Split an exist record.
	cyber_recorder recover	Recover an exist record.

#4 打包安装

cmake -DCMAKE_INSTALL_PREFIX=安装路径 ..
make 
make package
sudo dpkg -i package/*.deb