Robowflex  v0.1
Making MoveIt Easy
resources_visualization.cpp File Reference

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Variables

const std::string FETCH [4]
 
const std::string UR5 [4]
 
const std::string PANDA [4]
 
const std::string BAXTER [4]
 
const std::string YUMI [4]
 
const std::string SHADOWHAND [4]
 

Detailed Description

A helper script to visualize all the robots available in robowflex_resources, see https://github.com/KavrakiLab/robowflex_resources. You should run RViz and have a PlanningScene visualization display enabled set to look at /robowflex/robot_description. Enable/Disable the PlanningScene display after running the script with a robot to see it displayed.

Currently, the robots available are the Fetch, UR5, Panda, Baxter, and YuMi. See output for details.

Definition in file resources_visualization.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 67 of file resources_visualization.cpp.

68 {
69  // Startup ROS
70  ROS ros(argc, argv);
71 
72  if (argc != 2)
73  RBX_FATAL("Specify robot to load as an argument "
74  "(e.g., `rosrun robowflex_library resources_visualization <robot>`). "
75  "Can be {baxter, ur5, panda, fetch, yumi, shadowhand}.");
76 
77  const auto name = std::string(argv[1]);
78 
79  // Create an empty robot.
80  const auto &robot = std::make_shared<Robot>(name);
81 
82  // Initialize robot from argument.
83  if (name == "fetch")
84  robot->initialize(FETCH[0], FETCH[1], FETCH[2], FETCH[3]);
85  else if (name == "ur5")
86  robot->initialize(UR5[0], UR5[1], UR5[2], UR5[3]);
87  else if (name == "panda")
88  robot->initialize(PANDA[0], PANDA[1], PANDA[2], PANDA[3]);
89  else if (name == "baxter")
90  robot->initialize(BAXTER[0], BAXTER[1], BAXTER[2], BAXTER[3]);
91  else if (name == "yumi")
92  robot->initialize(YUMI[0], YUMI[1], YUMI[2], YUMI[3]);
93  else if (name == "shadowhand")
94  robot->initialize(SHADOWHAND[0], SHADOWHAND[1], SHADOWHAND[2], SHADOWHAND[3]);
95  else
96  RBX_FATAL("Unknown robot. Can be {baxter, ur5, panda, fetch, yumi, shadowhand}.");
97 
98  // Create an RViz visualization helper. Publishes all topics and parameter under `/robowflex` by default.
99  IO::RVIZHelper rviz(robot);
100 
101  RBX_INFO("Press enter to exit.");
102  std::cin.ignore();
103 
104  return 0;
105 }
RVIZ visualization helper. See Live Visualization with RViz for more information.
Definition: visualization.h:38
RAII-pattern for starting up ROS.
Definition: util.h:52
#define RBX_INFO(fmt,...)
Output a info logging message.
Definition: log.h:118
#define RBX_FATAL(fmt,...)
Output a fatal logging message.
Definition: log.h:94
Functions for loading and animating robots in Blender.
const std::string BAXTER[4]
const std::string FETCH[4]
const std::string SHADOWHAND[4]
const std::string UR5[4]
const std::string YUMI[4]
const std::string PANDA[4]

Variable Documentation

◆ BAXTER

const std::string BAXTER[4]
Initial value:
= {
"package://robowflex_resources/baxter/urdf/baxter.urdf.xacro",
"package://robowflex_resources/baxter/config/baxter.srdf",
"package://robowflex_resources/baxter/config/joint_limits.yaml",
"package://robowflex_resources/baxter/config/kinematics.yaml"
}

Definition at line 44 of file resources_visualization.cpp.

◆ FETCH

const std::string FETCH[4]
Initial value:
= {
"package://robowflex_resources/fetch/robots/fetch.urdf",
"package://robowflex_resources/fetch/config/fetch.srdf",
"package://robowflex_resources/fetch/config/joint_limits.yaml",
"package://robowflex_resources/fetch/config/kinematics.yaml"
}

Definition at line 20 of file resources_visualization.cpp.

◆ PANDA

const std::string PANDA[4]
Initial value:
= {
"package://robowflex_resources/panda/urdf/panda.urdf",
"package://robowflex_resources/panda/config/panda.srdf",
"package://robowflex_resources/panda/config/joint_limits.yaml",
"package://robowflex_resources/panda/config/kinematics.yaml"
}

Definition at line 36 of file resources_visualization.cpp.

◆ SHADOWHAND

const std::string SHADOWHAND[4]
Initial value:
= {
"package://robowflex_resources/shadowhand/urdf/shadowhand.urdf",
"package://robowflex_resources/shadowhand/config/shadowhand.srdf",
"package://robowflex_resources/shadowhand/config/joint_limits.yaml",
"package://robowflex_resources/shadowhand/config/kinematics.yaml"
}

Definition at line 60 of file resources_visualization.cpp.

◆ UR5

const std::string UR5[4]
Initial value:
= {
"package://robowflex_resources/ur/robots/ur5_robotiq_robot_limited.urdf.xacro",
"package://robowflex_resources/ur/config/ur5/ur5_robotiq85_table.srdf.xacro",
"package://robowflex_resources/ur/config/ur5/joint_limits.yaml",
"package://robowflex_resources/ur/config/ur5/kinematics.yaml"
}

Definition at line 28 of file resources_visualization.cpp.

◆ YUMI

const std::string YUMI[4]
Initial value:
= {
"package://robowflex_resources/yumi/urdf/yumi.urdf",
"package://robowflex_resources/yumi/config/yumi.srdf",
"package://robowflex_resources/yumi/config/joint_limits.yaml",
"package://robowflex_resources/yumi/config/kinematics.yaml"
}

Definition at line 52 of file resources_visualization.cpp.