Obtain object rest poses. More...
#include "gen_rest_poses.hh"Functions | |
| int | main (int _argc, char **_argv) |
| const std::string | getUsage (const char *argv_0) |
| Obtains usage string. More... | |
| void | parseArgs (int argc, char **argv, std::string &obj_cfg_dir, std::string &out_rest_dir) |
| Parses command-line arguments. More... | |
| void | setupCommunications (gazebo::transport::NodePtr &node, std::map< std::string, gazebo::transport::PublisherPtr > &pubs, std::map< std::string, gazebo::transport::SubscriberPtr > &subs) |
| Sets up gazebo communication pubs/subs. More... | |
| void | obtainTargets (std::vector< std::string > &targets, const std::string &file_name) |
| TODO. More... | |
| void | getTargetRestPose (gazebo::transport::PublisherPtr pub) |
| Requests target object rest pose. More... | |
| bool | waitingTrigger (std::mutex &mutex, bool &trigger) |
| Returns whether to keep waiting for trigger. More... | |
| void | onTargetResponse (TargetResponsePtr &_msg) |
| Callback for Target plugin response. More... | |
| void | waitMs (int delay) |
| TODO. More... | |
Variables | |
| bool | g_resting {false} |
| Global object resting flag. More... | |
| std::mutex | g_resting_mutex |
| Mutex for global object resting flag. More... | |
| const ignition::math::Pose3d | INIT_POSE {0,0,0.1,0,0,0} |
| Global initial object pose. More... | |
| ignition::math::Pose3d | g_rest_pose {0,0,0,0,0,0} |
| Global object resting pose. More... | |
Obtain object rest poses.
Drop each object in dataset from given pose and record rest pose
| void getTargetRestPose | ( | gazebo::transport::PublisherPtr | pub | ) |
Requests target object rest pose.
| pub | Publisher to target's topic |
| const std::string getUsage | ( | const char * | argv_0 | ) |
Obtains usage string.
Returns usage string.
| argv_0 | Name of the executable |
| int main | ( | int | _argc, |
| char ** | _argv | ||
| ) |
| void obtainTargets | ( | std::vector< std::string > & | targets, |
| const std::string & | file_name | ||
| ) |
TODO.
Obtain list of models' names in dataset yml.
| void onTargetResponse | ( | TargetResponsePtr & | _msg | ) |
Callback for Target plugin response.
TODO.
| void parseArgs | ( | int | argc, |
| char ** | argv, | ||
| std::string & | obj_cfg_dir, | ||
| std::string & | out_rest_dir | ||
| ) |
Parses command-line arguments.
| argc | Argument count |
| argv | Arguments |
| obj_cfg_dir | Path to object dataset yaml |
| out_rest_dir | Directory for output rest poses |
| void setupCommunications | ( | gazebo::transport::NodePtr & | node, |
| std::map< std::string, gazebo::transport::PublisherPtr > & | pubs, | ||
| std::map< std::string, gazebo::transport::SubscriberPtr > & | subs | ||
| ) |
Sets up gazebo communication pubs/subs.
| node | Gazebo communication node pointer |
| pubs | Resulting map of publishers |
| subs | Resulting map of subscribers |
| bool waitingTrigger | ( | std::mutex & | mutex, |
| bool & | trigger | ||
| ) |
Returns whether to keep waiting for trigger.
| mutex | Mutex that protects trigger variable |
| trigger | Trigger boolean variable |
|
inline |
TODO.
Waits for delay milliseconds.
| ignition::math::Pose3d g_rest_pose {0,0,0,0,0,0} |
Global object resting pose.
| bool g_resting {false} |
Global object resting flag.
| std::mutex g_resting_mutex |
Mutex for global object resting flag.
| const ignition::math::Pose3d INIT_POSE {0,0,0.1,0,0,0} |
Global initial object pose.