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

shreyasgan's profile - activity

2022-10-12 04:26:49 -0500 marked best answer Staubli TX 90 Robot model not loading in Rviz

Hello,

The problem is, that with some point sets the robot model is loaded and can compete 100% of the path, and with some point sets the robot model is not loaded regardless of how much of the path was completed (sometimes even 100% path).


Edit2: I am using moveit's move_group interface to compute cartesian path. I am using stabli_experimental's staubli_val3_driver package to stream the Joint Trajectory message to the live robot, The MATLAB code is ran on another machine, which outputs a .csv file with the points to be followed. I receive a translation and rotation file from someone else (the points set) and input that into my program.


Edit 3: So i have figured out the problem, and the problem was that I was using staubli-experimental's kinetic package, instead of the indigo package. This caused an error in the generation of the moveit_setup_assistant moveit_config files.


Edit 4: I thought the above would solve the problem, but I am still getting the same "no robot state or model" loaded error. One thing I did notice is that when the .cpp file that computes and publishes the path (node) dies while rviz is running (i.e. vector out of bounds error), the "no robot model loaded" error does not show. I think there may be something wrong with the way I am publishing the path to rviz? In the moveit tutorial there was no explicit publishing from the cpp node to the rviz node, so I assumed I would not have to do this.

I ran the regular indigo moveit move group interface tutorials.cpp file, which did not produce the "no robot model loaded" problem.

How would I go about this? This problem does not occur when I just run the demo.launch file.

I assume theres a problem with the way I set up or do things with moveit in my cpp code, so I have provided that below:

    ros::init(argc, argv, "pub_wp");
    ros::NodeHandle nh;

    ros::AsyncSpinner spinner(1);
    spinner.start();

    ros::Publisher pub = nh.advertise<PointCloud>("points2", 1);
    ros::Publisher joint_pub = nh.advertise<trajectory_msgs::JointTrajectory>("/joint_path_command", 1);
    ros::Publisher nav_pub = nh.advertise<nav_msgs::Path>("/path_marker", 1);
    ros::Publisher markerA_pub = nh.advertise<visualization_msgs::MarkerArray>("/array_marker", 1);
    ros::Publisher marker_pub = nh.advertise<visualization_msgs::Marker>("/arrow_marker", 1);
    ros::Subscriber joint_sub = nh.subscribe<sensor_msgs::JointState>("/joint_states", 1, jointStateCallback);
    moveit_msgs::RobotTrajectory trajectory;
    double fraction = group.computeCartesianPath(waypoints, 0.01, 0.0, trajectory);
    sleep(5.0);

    trajectory_msgs::JointTrajectory JT = trajectory.joint_trajectory;
    while (end == false)
    {

        pub.publish(cloud);
        nav_pub.publish(pathx);
        marker_pub.publish(mark);
        // if(JT.points.size() != 0)
        // {

        sleep(5.0);
        end = true;
        // }
        // loop_rate.sleep(30);
    }
    end = false;
    while (end != true)
    {
        joint_pub.publish(JT);
        sleep(5.0);
        end = true;
    }
    ros::shutdown();

    return 0;
}
2019-07-18 18:54:26 -0500 received badge  Famous Question (source)
2019-06-25 20:37:13 -0500 received badge  Famous Question (source)
2019-05-14 15:17:48 -0500 received badge  Famous Question (source)
2019-05-14 15:03:33 -0500 answered a question Staubli TX 90 Robot model not loading in Rviz

I solved this problem by adding a sleep before rviz comes up to give time to load the robot model.

2019-05-09 16:00:19 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, The problem is, that with some point sets the robot model is load

2019-05-09 15:59:04 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-05-09 15:57:45 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-05-09 15:47:26 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-05-09 15:47:26 -0500 received badge  Associate Editor (source)
2019-05-09 15:26:49 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-05-09 15:15:04 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-05-09 15:06:11 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-05-09 15:03:20 -0500 commented question Staubli TX 90 Robot model not loading in Rviz

Hello, @gvdhoon I updated my question with new information, please advise on how to get past this. Thank you for helping

2019-05-09 15:02:37 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-05-05 06:28:13 -0500 received badge  Famous Question (source)
2019-05-05 06:28:13 -0500 received badge  Notable Question (source)
2019-05-05 06:28:13 -0500 received badge  Popular Question (source)
2019-04-30 06:43:31 -0500 received badge  Notable Question (source)
2019-04-25 15:29:44 -0500 commented question Staubli TX 90 Robot model not loading in Rviz

Yes, I am running Indigo with ubuntu 14.04. What other information will you need? Thank you for helping.

2019-04-25 14:45:52 -0500 received badge  Notable Question (source)
2019-04-25 14:43:28 -0500 commented question Staubli TX 90 Robot model not loading in Rviz

I build moveit from source so I can change the "moveit_ros/visualization/robot_state_rviz_plugin/src/robot_state_display

2019-04-25 14:36:13 -0500 commented question Staubli TX 90 Robot model not loading in Rviz

I was was looking into what the problem could be, and it could be that I did not configure my moveit workspace properly.

2019-04-25 14:03:08 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-04-25 14:02:52 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-04-25 13:39:00 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-04-25 13:34:37 -0500 commented question Staubli TX 90 Robot model not loading in Rviz

I updated my ROS logging config, and have updated the error message in the question. The error seems to be coming from

2019-04-24 20:43:30 -0500 received badge  Popular Question (source)
2019-04-24 15:16:54 -0500 edited question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-04-23 12:44:17 -0500 asked a question Staubli TX 90 Robot model not loading in Rviz

Staubli TX 90 Robot model not loading in Rviz Hello, So I have a cpp program where I input a set of points (x,y,z, rot

2019-03-01 16:36:12 -0500 marked best answer Moveit Inverse Kinematics Solver not working properly

Hello,

I am working with ROS Kinetic on Ubuntu 16.04, and I am trying to send end effector poses to my Staubli TX90 using move group commands. I send an [x,y,z] coordinate through the setPositionTarget function, and a [r,p,y] target through the setRPYTarget function, and the movement in Rviz does not reflect the desired movement. When i send joint angle commands, everything works as expected, and I am able to get the [x,y,z] position (which means forward kinematics is working fine).

So the problem is definitely with the inverse kinematics solver.

The URDF files I am using to create my moveit package are directly from Staubli Experimental, so there should be no problem with that.

I am using Moveit's default kinematics solver and planning library.

Here is the code for the commands I am sending: NOTE: I commented out the changing of the x and y values to see if the end effector will move if I give it the same pose over and over again (which it shouldn't, but it does.) visual_tools.prompt("Press 'next' in the RvizVisualToolsGui window to start the demo");

move_group.setNamedTarget("all-zeros");



// Ask Rviz to visualize and not move
moveit::planning_interface::MoveGroupInterface::Plan my_plan;

success = (move_group.plan(my_plan) == moveit::planning_interface::MoveItErrorCode::SUCCESS);
move_group.execute(my_plan);


double rad = 0.0;
double x = 0.0;
double y = 0.0;
double z = 0.0;
std::vector<double> rpy; 


geometry_msgs::PoseStamped current_poseS;
geometry_msgs::Pose current_pose;
geometry_msgs::PoseStamped target_pose;

current_poseS = move_group.getCurrentPose(move_group.getEndEffectorLink().c_str());
rpy = move_group.getCurrentRPY(move_group.getEndEffectorLink().c_str());
cout << "XYZ position       :" << "[" << current_poseS.pose.position.x << ", " << current_poseS.pose.position.y << ", " << current_poseS.pose.position.z << ", " << current_poseS.pose.orientation.w << "]" << "\n";

for(double rad = 0.0; rad < 3; rad += 0.1) {

//x = current_poseS.pose.position.x + cos(rad);

//y = current_poseS.pose.position.y + sin(rad);

move_group.setPositionTarget(x, y, z, move_group.getEndEffectorLink().c_str());

move_group.setRPYTarget(rpy[0], rpy[1], rpy[2], move_group.getEndEffectorLink().c_str());

cout << "XYZ desired position : " << "[" << x << ", " << y << ", " << z << "]" << "\n";

success = (move_group.plan(my_plan) == moveit::planning_interface::MoveItErrorCode::SUCCESS);

move_group.execute(my_plan);

target_pose = move_group.getCurrentPose(move_group.getEndEffectorLink().c_str());

cout << "XYZ actual position: " << "[" << target_pose.pose.position.x << ", " << target_pose.pose.position.y << ", " << target_pose.pose.position.z << "]" << "\n";

}

In this code, I output the position values of what I ask the end effector to do, and what it actually does. Here are the values for that:

XYZ position :[0.149872, 5.96057e-06, 2.11, 1]

XYZ desired position : [0.149872, 5.96057e-06, 2.11]

XYZ actual position: [-0.171006, 0.125541, 1.02336]

XYZ desired position : [0.149872, 5.96057e-06, 2.11]

XYZ actual position: [1.36898, 0.0393462, 0.0825644]

XYZ desired position : [0.149872, 5.96057e-06, 2.11]

XYZ actual position: [0.125503, -1.30601, 0.334007]

XYZ desired position : [0.149872, 5.96057e-06, 2.11]

XYZ actual position: [-0.166515, 0.520085, 1.04025]

XYZ desired position : [0.149872, 5.96057e-06, 2.11]

XYZ actual position: [0.858479, 1.07407, 0.799356]

XYZ desired position : [0.149872, 5.96057e-06, 2 ... (more)

2019-03-01 16:29:49 -0500 marked best answer Trajectory Splicing Error

Hello,

I am trying to send my Staubli TX90 robot arm a Joint Trajectory command which publishes to /joint_path_command, which the motion_streaming_interface node subscribes to. My code complies and build correctly, but when I run the node, there is an error saying "Trajectory splicing not yet implemented, stopping current motion." I looked online and noticed that:

// read current state value (should be atomic)
int state = this->state_;

ROS_DEBUG("Current state is: %d", state);

if (TransferStates::IDLE != state)
{

if (msg->points.empty())

ROS_INFO("Empty trajectory received, canceling current trajectory");

else

ROS_ERROR("Trajectory splicing not yet implemented, stopping current motion.");

     this->mutex_.lock();

trajectoryStop();

     this->mutex_.unlock();

return;

This is my code for the node that I am running to communicate with the robot arm and subscribe to /joint_states and publish to /joint_path_command:

using namespace std;

sensor_msgs::JointState JS;

void jointStateCallback(const sensor_msgs::JointState msg) { JS = msg; }

int main(int argc, char** argv) { 
  ros::init(argc, argv, "mover_node");

  ros::NodeHandle n;
  ros::AsyncSpinner spinner(1);
  spinner.start();

  bool success;

  ros::Publisher joint_pub = n.advertise<trajectory_msgs::jointtrajectory>("/joint_path_command", 1);
  ros::Subscriber joint_sub = n.subscribe<sensor_msgs::jointstate>("/joint_states", 1, jointStateCallback);
  ros::Rate rate(10.0);

  trajectory_msgs::JointTrajectory JT;

  JT.joint_names.clear();
  JT.joint_names.push_back("joint_1");
  JT.joint_names.push_back("joint_2");
  JT.joint_names.push_back("joint_3");
  JT.joint_names.push_back("joint_4");
  JT.joint_names.push_back("joint_5");
  JT.joint_names.push_back("joint_6");

  JT.points.resize(2);
  JT.points[0].positions.resize(JT.joint_names.size());
  JT.points[1].positions.resize(JT.joint_names.size());

  while(ros::ok()) {

    if(JS.position.size() != 0)
    {
      cout << JT << endl;

      JT.points[0].time_from_start = ros::Duration(0.0001);
      JT.points[0].positions = JS.position;

      JT.points[1].positions[0] = 0.0;
      JT.points[1].positions[1] = 0.0;
      JT.points[1].positions[2] = 0.0;
      JT.points[1].positions[3] = 0.0;
      JT.points[1].positions[4] = 0.0;
      JT.points[1].positions[5] = 0.0;
      JT.points[1].time_from_start = ros::Duration(1);

      joint_pub.publish(JT);
    }
    rate.sleep();
  } 
  ros::shutdown();

  return 0;
}

The values of the JT object are:

header:

seq: 0

stamp: 0.000000000

frame_id:

joint_names[]

joint_names[0]: joint_1

joint_names[1]: joint_2

joint_names[2]: joint_3

joint_names[3]: joint_4

joint_names[4]: joint_5

joint_names[5]: joint_6

points[]

points[0]:

positions[]

  positions[0]: 0.883191

  positions[1]: -0.00796466

  positions[2]: -0.0596276

  positions[3]: 3.05678

  positions[4]: -0.00680966

  positions[5]: 0.0617737

velocities[]

accelerations[]

effort[]

time_from_start: 0.000100000

points[1]:

positions[]

  positions[0]: 0

  positions[1]: 0

  positions[2]: 0

  positions[3]: 0

  positions[4]: 0

  positions[5]: 0

velocities[]

accelerations[]

effort[]

time_from_start: 1.000000000
2019-03-01 16:28:02 -0500 received badge  Famous Question (source)
2019-02-22 02:22:33 -0500 received badge  Popular Question (source)
2019-02-21 13:21:20 -0500 commented question Cartesian Planner not completing path,

I edited my post, and I can send you videos but cannot upload on here for some reason

2019-02-21 13:20:58 -0500 edited question Cartesian Planner not completing path,

Cartesian Planner not completing path, **EDIT: I am working with the Staubli tx-90 robot I figured out why I was gettin

2019-02-18 18:23:50 -0500 asked a question Cartesian Planner not completing path,

Cartesian Planner not completing path, Hello All , I generated a set of waypoints in Matlab (rotation and translation),

2019-02-04 16:33:54 -0500 received badge  Popular Question (source)
2019-02-04 16:33:54 -0500 received badge  Notable Question (source)
2018-11-15 15:51:01 -0500 edited question How to add custom tool to robot end effector in URDF or Xacro for Moveit!

How to add custom tool to robot end effector in URDF or Xacro for Moveit! I am using ROS kinetic on Ubuntu 16.04 I woul

2018-11-15 15:50:50 -0500 edited question How to add custom tool to robot end effector in URDF or Xacro for Moveit!

How to add custom tool to robot end effector in URDF or Xacro for Moveit! I am using ROS kinetic on Ubuntu 16.04 I woul

2018-11-15 15:49:48 -0500 received badge  Organizer (source)
2018-11-15 15:48:45 -0500 asked a question How to add custom tool to robot end effector in URDF or Xacro for Moveit!

How to add custom tool to robot end effector in URDF or Xacro for Moveit! I am using ROS kinetic on Ubuntu 16.04 I woul

2018-09-24 13:09:31 -0500 asked a question Trouble visualizing PointCloud2 in Rviz

Trouble visualizing PointCloud2 in Rviz Hello, I publish a PointCloud2 message to a predefined topic that rviz's PointC

2018-08-24 12:54:11 -0500 commented answer Trajectory Splicing Error

Thank you! The code works now that I have removed the rate(10.0) line. I was wondering, how would I send an end effector

2018-08-24 12:52:07 -0500 received badge  Notable Question (source)
2018-08-24 11:09:13 -0500 commented answer Trajectory Splicing Error

Alright, so I am just trying to send a simple command to my TX90 robot arm, which has ROS integration. My final goal is

2018-08-23 16:42:41 -0500 received badge  Popular Question (source)
2018-08-23 16:18:19 -0500 edited question Trajectory Splicing Error

Trajectory Splicing Error Hello, I am trying to send my Staubli TX90 robot arm a Joint Trajectory command which publish