ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Levi_Manring's profile - activity

2019-08-03 11:04:04 -0500 received badge  Famous Question (source)
2019-07-14 14:43:50 -0500 received badge  Self-Learner (source)
2019-07-14 14:43:50 -0500 received badge  Teacher (source)
2019-02-12 19:51:59 -0500 received badge  Famous Question (source)
2018-12-17 12:41:03 -0500 received badge  Famous Question (source)
2018-12-13 01:00:21 -0500 received badge  Famous Question (source)
2018-10-14 10:50:25 -0500 received badge  Notable Question (source)
2018-09-18 01:25:52 -0500 received badge  Notable Question (source)
2018-07-30 06:17:57 -0500 received badge  Notable Question (source)
2018-07-17 11:34:20 -0500 received badge  Famous Question (source)
2018-07-17 10:35:40 -0500 commented answer Issues with Spin() and AsyncSpinner: multithreaded application

I will say that it never executes the ROS_INFO statements in the code. So it stops after the group.plan command.

2018-07-17 10:34:27 -0500 commented answer Issues with Spin() and AsyncSpinner: multithreaded application

I have posted the changes in a edit at the bottom of my question. I eliminated all the if statements and simplified as

2018-07-17 10:31:36 -0500 edited question Issues with Spin() and AsyncSpinner: multithreaded application

Issues with Spin() and AsyncSpinner: multithreaded application Hello the following code gives me this error: SingleThrea

2018-07-16 15:06:40 -0500 commented answer Issues with Spin() and AsyncSpinner: multithreaded application

Thanks for your help. I have tried doing what you have suggested in a number of forms, with no success. I eliminated t

2018-07-13 14:58:19 -0500 received badge  Notable Question (source)
2018-07-13 13:57:50 -0500 commented answer Issues with Spin() and AsyncSpinner: multithreaded application

I have also just tried eliminating every spinner except the once inside the main init node clause, and if I do that, not

2018-07-13 13:18:32 -0500 commented answer Issues with Spin() and AsyncSpinner: multithreaded application

Thanks for your help. I posted my whole node in an edit, so hopefully it makes a bit more sense. I will say that I tri

2018-07-13 13:16:54 -0500 edited question Issues with Spin() and AsyncSpinner: multithreaded application

Issues with Spin() and AsyncSpinner: multithreaded application Hello the following code gives me this error: SingleThrea

2018-07-13 13:03:49 -0500 received badge  Enthusiast
2018-07-13 02:23:22 -0500 received badge  Popular Question (source)
2018-07-12 19:00:39 -0500 asked a question Issues with Spin() and AsyncSpinner: multithreaded application

Issues with Spin() and AsyncSpinner: multithreaded application Hello the following code gives me this error: SingleThrea

2018-07-12 17:25:49 -0500 received badge  Popular Question (source)
2018-07-12 15:12:27 -0500 answered a question How can I execute a moveit_msgs::RobotTrajectory that I have on file?

Ok, so this is what I did to solve this issue. I created a fake plan, then populated the .trajectory_ with my robot tra

2018-07-12 14:13:27 -0500 edited question How can I execute a moveit_msgs::RobotTrajectory that I have on file?

How can I execute a moveit_msgs::RobotTrajectory that I have on file? I am trying to execute a RobotTrajectory on a Move

2018-07-12 12:11:53 -0500 answered a question Planning and executing with logic commands: how do I keep a plan "alive" so I can decide to execute it later?

What I ended up doing was writing the motion plan to a .bag file, and then reading from it at a later point. The timing

2018-07-12 12:08:06 -0500 received badge  Notable Question (source)
2018-07-12 12:07:36 -0500 commented question Node is subscribed to a topic but not receiving the message

To me this sounds like it might be a spinner issue. Have you looked into that?

2018-07-12 11:52:30 -0500 asked a question How can I execute a moveit_msgs::RobotTrajectory that I have on file?

How can I execute a moveit_msgs::RobotTrajectory that I have on file? I am trying to execute a RobotTrajectory on a Move

2018-07-12 11:08:20 -0500 marked best answer How can I record a single message in a rosbag to reserve to reload for future use?

I have a node that creates a motion plan of the type moveit_msgs::RobotTrajectory. I want to hold this motion plan for future use (i.e., load it later to "execute" it). However, I only want to save one of these motion plans to a file at one time: i.e., I want my .bag file to only ever contain one file so when I load it, I will only load one motion plan. Any suggestions for ways to do this or better ways to accomplish the same end? This concept is easy to implement in matlab by just overwriting files.

Here is some of my code...

void automaticCallback(const geometry_msgs::Pose::ConstPtr& msg)
{
  ros::AsyncSpinner spinner(4);
  spinner.start();

  std::string jointgroup = "sia5dArm";
  move_group_interface::MoveGroup group(jointgroup);

  moveit::planning_interface::MoveGroup::Plan my_plan;
  group.setPoseTarget(*msg);
  bool success = group.plan(my_plan);

  ROS_INFO("Visualizing plan 1 (pose goal) %s",success?"":"FAILED");

  if (success == true)
  {
    std::vector<trajectory_msgs::JointTrajectoryPoint> trajectory_points;
    trajectory_points = my_plan.trajectory_.joint_trajectory.points;

    std::vector<int>::size_type points_number = trajectory_points.size();
    std::vector<double> motionPlan_msg;
    std::vector<double> motionPlan_times;

    for (unsigned i = 0; i<points_number; i++)
    {
       std::vector<int>::size_type joints_number = trajectory_points[i].positions.size();
       double trajectory_time = ros::Duration(trajectory_points[i].time_from_start).toSec();

       motionPlan_times.push_back(trajectory_time); 

       for (unsigned j = 0; j<joints_number; j++)
       {
          motionPlan_msg.push_back(trajectory_points[i].positions[j]);
        } 
    }

sensor_msgs::JointState motionPlan_position;
motionPlan_position.position = motionPlan_msg;
motionPlan_position.effort = motionPlan_times;

ros::NodeHandle n;
ros::Publisher motionPlan_pub = n.advertise<sensor_msgs::JointState>("motionPlan",1000);
motionPlan_pub.publish(motionPlan_position);

    ros::spin();

 }

 ros::waitForShutdown();

}

(A side note... if anyone can see anything wrong with my spinners, please lmk. It keeps throwing an error telling me I need multithreaded spinners, but I when I try that nothing publishes.)

2018-07-12 10:37:17 -0500 commented answer How can I record a single message in a rosbag to reserve to reload for future use?

so this works for motionPlan_position, but what I actually want to save to the .bag file is my_plan, which is a Robot Tr

2018-07-12 08:06:03 -0500 received badge  Popular Question (source)
2018-07-11 18:35:55 -0500 asked a question How can I record a single message in a rosbag to reserve to reload for future use?

How can I record a single message in a rosbag to reserve to reload for future use? I have a node that creates a motion p

2018-07-10 21:43:51 -0500 received badge  Popular Question (source)
2018-07-10 01:26:50 -0500 received badge  Popular Question (source)
2018-07-09 17:49:39 -0500 edited question Planning and executing with logic commands: how do I keep a plan "alive" so I can decide to execute it later?

Planning and executing with logic commands: how do I keep a plan "alive" so I can decide to execute it later? Hello! I

2018-07-09 17:48:46 -0500 edited question Planning and executing with logic commands: how do I keep a plan "alive" so I can decide to execute it later?

Planning and executing with logic commands: how do I keep a plan "alive" so I can decide to execute it later? Hello! I

2018-07-09 17:48:46 -0500 received badge  Editor (source)
2018-07-09 16:10:48 -0500 edited question Planning and executing with logic commands: how do I keep a plan "alive" so I can decide to execute it later?

Planning and executing with logic commands: how do I keep a plan "alive" so I can decide to execute it later? Hello! I

2018-07-09 16:09:16 -0500 asked a question Planning and executing with logic commands: how do I keep a plan "alive" so I can decide to execute it later?

Planning and executing with logic commands: how do I keep a plan "alive" so I can decide to execute it later? Hello! I

2018-07-09 15:01:06 -0500 answered a question Force/torque values while planning trajectories in MoveIt Motion Planner

I would recommend using another software to deal with this. I would try Mathworks Robotics system toolbox. You can sen

2018-07-05 08:41:15 -0500 marked best answer Moveit Group not found: issues executing a plan via cpp

I have created a standard MoveIt! package. I want to control this package "sia5d_cmd" using a node. There are lots of examples of code for this, but no explicit information as to how to get a custom made node to talk with a MoveIt! package.

I have my MoveIt! package (sia5d_cmd) and the package that contains the node (test_moveit) I want to run in the same catkin workspace. I demo.launch the MoveIt! package which contains a group called "sia5d". I then launch my node test_moveit_node.cpp as normal. This is my code for that:

#include <ros/ros.h>
#include <moveit/move_group_interface/move_group.h>

int main(int argc, char **argv)
{
  ros::init(argc, argv, "MoveGroupInterface"); //ros::init_options::AnonymousName
  // start a ROS spinning thread
  ros::AsyncSpinner spinner(1);
  spinner.start();
  // this connects to a running instance of the move_group node
  move_group_interface::MoveGroup group("sia5d");
  // specify that our target will be a random one
  group.setRandomTarget();
  // plan the motion and then move the group to the sampled target
  group.move();
  ros::waitForShutdown();
}

This is the error I get:

[FATAL] [1530796096.618661297]: Group 'sia5d' was not found.
terminate called after throwing an instance of 'std::runtime_error'
  what():  Group 'sia5d' was not found.

I am sure there is some issue with how I am connecting these things together. I am a bit newer to ROS than most, but information online about this is surprisingly sparse and poorly documented and I have been trying for a week to be able to plan/move the robot in RViz using a node. Any help would be much appreciated.

Thanks!

2018-07-05 08:41:15 -0500 received badge  Scholar (source)
2018-07-05 08:32:26 -0500 received badge  Supporter (source)
2018-07-05 08:25:58 -0500 asked a question Moveit Group not found: issues executing a plan via cpp

Moveit Group not found: issues executing a plan via cpp I have created a standard MoveIt! package. I want to control thi