Public Member Functions | Public Attributes | List of all members
WebotsRobot Class Reference

#include <rosinljubljana.h>

Inheritance diagram for WebotsRobot:
Inheritance graph
[legend]

Public Member Functions

void enableGyro (ros::NodeHandle)
 
void gyroCallback (const sensor_msgs::Imu &imu)
 
void init (ros::NodeHandle, std::string)
 
void moveCallback (const geometry_msgs::Twist &msg)
 
void subscribeGyro (ros::NodeHandle)
 
void subscribeMove (ros::NodeHandle)
 
void transmitLaserScan (WebotsRobot[], int list_length, Field *field)
 
 WebotsRobot ()
 
- Public Member Functions inherited from Robot
void EKFOdometryCallback (const nav_msgs::Odometry &msg)
 
void odometryCallback (const nav_msgs::Odometry &msg)
 
 Robot ()
 
void setFrames ()
 
void setName (std::string, ros::NodeHandle nh)
 
void setPositionOrientation (tf::Vector3, tf::Quaternion)
 
void transmitFrames ()
 
void transmitLaserScan (Robot[], int list_length, Field *field)
 
void transmitOdom ()
 
void transmitPoseFromAlvarPoseMsg ()
 
void updatePositionOrientation ()
 

Public Attributes

std::stringstream cmd_vel_subscriber_name
 name of topic for cmd_vel More...
 
std::string controllerNameinWebots
 name of controller in webots environment More...
 
std::string gyroNameinWebots
 
ros::ServiceClient leftWheelPositionClient
 
ros::ServiceClient leftWheelVelocityClient
 
ros::ServiceClient rightWheelPositionClient
 service clients for individual wheels of robot More...
 
ros::ServiceClient rightWheelVelocityClient
 
std::string robotNameinWebots
 name of robot in webots environment More...
 
ros::Subscriber subCmd_vel
 Subscriber for cmd_vel topic. More...
 
ros::Subscriber subGyro
 
float wheelDistance
 Robot physical parameters. More...
 
float wheelRadius
 
webots_ros::set_float wheelSrv
 variable for interfacing with webots More...
 
- Public Attributes inherited from Robot
float angularz
 
tf::TransformBroadcaster br
 Broadcaster and listener of robot transforms. More...
 
float fi
 
std::stringstream frameAr_pose_markerName
 Name of alvar marker frame. More...
 
std::stringstream frameBase_linkName
 Name of base_link frame. More...
 
std::stringstream frameMapName
 Name of map frame. More...
 
std::stringstream frameOdomName
 Name of odom frame. More...
 
ros::Publisher LaserScan_publisher
 Publishers of LaserScan msg and Odometry msg. More...
 
std::stringstream LaserScan_publisher_name
 Name of LaserScan publisher. More...
 
tf::TransformListener listener
 
std::string name
 Number of robot. More...
 
nav_msgs::Odometry odom
 Variable for storing Odometry msg. More...
 
ros::Publisher odom_publisher
 
std::stringstream odom_publisher_name
 Name of odometry publisher. More...
 
geometry_msgs::PoseWithCovarianceStamped pose_alvar
 Vaifable for storing pose from alvar. More...
 
ros::Publisher pose_alvar_publisher
 
std::stringstream pose_alvar_publisher_name
 
std::stringstream robot_ekf_odom_subscriber_name
 
ros::Subscriber sub_ekf_odom
 subscriber for robot odometry from ekf_odom More...
 
ros::Time time
 Variables for determening time difference. More...
 
ros::Time time_2
 
tf::Transform transformBase_Link
 
tf::Transform transformMap
 Variables for transforms of frames. More...
 
tf::Transform transformOdom
 
float vx
 variables for storing position, veloctiy parameters More...
 
float vy
 
float x
 
float y
 

Detailed Description

Webots Robot is class for creating robot instance in Webots simulation environment.

Contains methods for communication with webots simulation environment.

Definition at line 349 of file rosinljubljana.h.

Constructor & Destructor Documentation

◆ WebotsRobot()

WebotsRobot::WebotsRobot ( )

Constructor for WebotsRobot instance.

Definition at line 532 of file rosinljubljana_objects.cpp.

Member Function Documentation

◆ enableGyro()

void WebotsRobot::enableGyro ( ros::NodeHandle  nh)

Enables gyro in webots.

Definition at line 677 of file rosinljubljana_objects.cpp.

◆ gyroCallback()

void WebotsRobot::gyroCallback ( const sensor_msgs::Imu &  imu)

Method for publishing robot odometry.

Definition at line 688 of file rosinljubljana_objects.cpp.

◆ init()

void WebotsRobot::init ( ros::NodeHandle  nh,
std::string  controllerName 
)

Connects to webots environment.

Parameters
nhros node nodehandle
controllerNamename of ros controller in webost environment

Definition at line 538 of file rosinljubljana_objects.cpp.

◆ moveCallback()

void WebotsRobot::moveCallback ( const geometry_msgs::Twist &  msg)

Callback method for subCmd_vel subscriber.

Parameters
msgTwist massage for controlling robot

Definition at line 565 of file rosinljubljana_objects.cpp.

◆ subscribeGyro()

void WebotsRobot::subscribeGyro ( ros::NodeHandle  nh)

Definition at line 693 of file rosinljubljana_objects.cpp.

◆ subscribeMove()

void WebotsRobot::subscribeMove ( ros::NodeHandle  nh)

Method for subscribing to topic

Parameters
nhros node nodehandle

Definition at line 672 of file rosinljubljana_objects.cpp.

◆ transmitLaserScan()

void WebotsRobot::transmitLaserScan ( WebotsRobot  robotek_list[],
int  list_length,
Field *  field 
)

Transmits Laser scan massage of robot

Parameters
robotek_listList of Numbers of all present robots
list_lengthNumber of all robots

Definition at line 580 of file rosinljubljana_objects.cpp.

Member Data Documentation

◆ cmd_vel_subscriber_name

std::stringstream WebotsRobot::cmd_vel_subscriber_name

name of topic for cmd_vel

Definition at line 420 of file rosinljubljana.h.

◆ controllerNameinWebots

std::string WebotsRobot::controllerNameinWebots

name of controller in webots environment

Definition at line 405 of file rosinljubljana.h.

◆ gyroNameinWebots

std::string WebotsRobot::gyroNameinWebots

Definition at line 421 of file rosinljubljana.h.

◆ leftWheelPositionClient

ros::ServiceClient WebotsRobot::leftWheelPositionClient

Definition at line 415 of file rosinljubljana.h.

◆ leftWheelVelocityClient

ros::ServiceClient WebotsRobot::leftWheelVelocityClient

Definition at line 417 of file rosinljubljana.h.

◆ rightWheelPositionClient

ros::ServiceClient WebotsRobot::rightWheelPositionClient

service clients for individual wheels of robot

Definition at line 414 of file rosinljubljana.h.

◆ rightWheelVelocityClient

ros::ServiceClient WebotsRobot::rightWheelVelocityClient

Definition at line 416 of file rosinljubljana.h.

◆ robotNameinWebots

std::string WebotsRobot::robotNameinWebots

name of robot in webots environment

Definition at line 408 of file rosinljubljana.h.

◆ subCmd_vel

ros::Subscriber WebotsRobot::subCmd_vel

Subscriber for cmd_vel topic.

Definition at line 428 of file rosinljubljana.h.

◆ subGyro

ros::Subscriber WebotsRobot::subGyro

Definition at line 429 of file rosinljubljana.h.

◆ wheelDistance

float WebotsRobot::wheelDistance

Robot physical parameters.

Definition at line 424 of file rosinljubljana.h.

◆ wheelRadius

float WebotsRobot::wheelRadius

Definition at line 425 of file rosinljubljana.h.

◆ wheelSrv

webots_ros::set_float WebotsRobot::wheelSrv

variable for interfacing with webots

Definition at line 411 of file rosinljubljana.h.


The documentation for this class was generated from the following files:


rosinljubljana
Author(s): Igor Banfi
autogenerated on Mon Feb 24 2020 12:32:36