mirror of
https://github.com/micro-ROS/micro-ROS-Agent.git
synced 2026-09-06 09:55:15 +02:00
Create graph manager after checking passed CLI arguments and launch xrce-dds server (#41)
This commit is contained in:
@@ -22,8 +22,19 @@ namespace agent {
|
||||
|
||||
Agent::Agent()
|
||||
: xrce_dds_agent_instance_(xrce_dds_agent_instance_.getInstance())
|
||||
, graph_manager_(std::make_unique<graph_manager::GraphManager>())
|
||||
, graph_manager_(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
bool Agent::create(
|
||||
int argc,
|
||||
char** argv)
|
||||
{
|
||||
bool result = xrce_dds_agent_instance_.create(argc, argv);
|
||||
if (result)
|
||||
{
|
||||
graph_manager_.reset(new graph_manager::GraphManager());
|
||||
|
||||
/**
|
||||
* Add CREATE_PARTICIPANT callback.
|
||||
*/
|
||||
@@ -147,13 +158,9 @@ Agent::Agent()
|
||||
eprosima::uxr::Middleware::Kind::FASTDDS,
|
||||
eprosima::uxr::middleware::CallbackKind::DELETE_DATAREADER,
|
||||
std::move(on_delete_datareader));
|
||||
}
|
||||
}
|
||||
|
||||
bool Agent::create(
|
||||
int argc,
|
||||
char** argv)
|
||||
{
|
||||
return xrce_dds_agent_instance_.create(argc, argv);
|
||||
return result;
|
||||
}
|
||||
|
||||
void Agent::run()
|
||||
|
||||
Reference in New Issue
Block a user