Skip to content

Commit

Permalink
updated devices:
Browse files Browse the repository at this point in the history
Localization2D_nws_yarp
Localization2D_nwc_yarp
Map2D_nws_yarp
Map2D_nwc_yarp
MobileBaseVelocityControl_nws_yarp
MobileBaseVelocityControl_nwc_yarp
Navigation2D_nwc_yarp
Navigation2D_nws_yarp
Odometry2D_nws_yarp
  • Loading branch information
randaz81 committed Jan 23, 2025
1 parent c3b521c commit a87f06a
Show file tree
Hide file tree
Showing 36 changed files with 706 additions and 683 deletions.
34 changes: 17 additions & 17 deletions src/devices/fake/fakeNavigationDevice/FakeNavigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,25 @@ ReturnValue FakeNavigation::gotoTargetByAbsoluteLocation(Map2DLocation loc)
m_absgoal_loc = loc;
m_time_counter= this->m_navigation_time;
}
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::gotoTargetByRelativeLocation(double x, double y, double theta)
{
yCInfo(FAKENAVIGATION) << "gotoTargetByRelativeLocation not yet implemented";
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::gotoTargetByRelativeLocation(double x, double y)
{
yCInfo(FAKENAVIGATION) << "gotoTargetByRelativeLocation not yet implemented";
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::followPath(const yarp::dev::Nav2D::Map2DPath& path)
{
yCInfo(FAKENAVIGATION) << "followPath not yet implemented";
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::applyVelocityCommand(double x_vel, double y_vel, double theta_vel, double timeout)
Expand All @@ -79,7 +79,7 @@ ReturnValue FakeNavigation::applyVelocityCommand(double x_vel, double y_vel, dou
m_control_out.angular_vel = theta_vel;
m_control_out.timeout = timeout;
m_control_out.reception_time = yarp::os::Time::now();
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::getLastVelocityCommand(double& x_vel, double& y_vel, double& theta_vel)
Expand All @@ -88,14 +88,14 @@ ReturnValue FakeNavigation::getLastVelocityCommand(double& x_vel, double& y_vel,
x_vel = m_control_out.linear_xvel;
y_vel = m_control_out.linear_yvel;
theta_vel = m_control_out.angular_vel;
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::stopNavigation()
{
m_status=NavigationStatusEnum::navigation_status_idle;
m_absgoal_loc=Map2DLocation();
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::suspendNavigation(double time)
Expand All @@ -104,7 +104,7 @@ ReturnValue FakeNavigation::suspendNavigation(double time)
{
m_status=NavigationStatusEnum::navigation_status_paused;
}
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::resumeNavigation()
Expand All @@ -113,37 +113,37 @@ ReturnValue FakeNavigation::resumeNavigation()
{
m_status = NavigationStatusEnum::navigation_status_moving;
}
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::getAllNavigationWaypoints(yarp::dev::Nav2D::TrajectoryTypeEnum trajectory_type, yarp::dev::Nav2D::Map2DPath& waypoints)
{
yCInfo(FAKENAVIGATION) << "getAllNavigationWaypoints not yet implemented";
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::getCurrentNavigationWaypoint(Map2DLocation& curr_waypoint)
{
yCInfo(FAKENAVIGATION) << "getCurrentNavigationWaypoint not yet implemented";
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::getCurrentNavigationMap(yarp::dev::Nav2D::NavigationMapTypeEnum map_type, MapGrid2D& map)
{
yCInfo(FAKENAVIGATION) << "getCurrentNavigationMap not yet implemented";
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::getNavigationStatus(yarp::dev::Nav2D::NavigationStatusEnum& status)
{
status = m_status;
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::getAbsoluteLocationOfCurrentTarget(Map2DLocation& target)
{
target=m_absgoal_loc;
return true;
target = m_absgoal_loc;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::recomputeCurrentNavigationPath()
Expand All @@ -152,13 +152,13 @@ ReturnValue FakeNavigation::recomputeCurrentNavigationPath()
{
//do something
}
return true;
return ReturnValue_ok;
}

ReturnValue FakeNavigation::getRelativeLocationOfCurrentTarget(double& x, double& y, double& theta)
{
yCInfo(FAKENAVIGATION) << "getRelativeLocationOfCurrentTarget not yet implemented";
return true;
return ReturnValue_ok;
}

bool FakeNavigation::threadInit()
Expand Down
Loading

0 comments on commit a87f06a

Please sign in to comment.