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;
}
Originally posted by shreyasgan on ROS Answers with karma: 26 on 2019-04-23
Post score: 0
Original comments
Comment by gvdhoorn on 2019-04-23:
"the robot model was not loaded" is too vague (for me at least).
You also don't tell us which packages you are using. RViz is one, but which staubli packages are you using? How is the communication with Matlab implemented and which node is computing your cartesian path? Is that custom code?
Seeing as RViz is involved: please show a screenshot of the situation where the robot "Is not loaded" and where it is. Perhaps we can see something that points to a cause.
Comment by gvdhoorn on 2019-04-24:
Please do not use comments to update your question. Edit it using the edit
button/link.
Comment by gvdhoorn on 2019-04-24:
From your update it would appear something cannot actually load the robot model. I'm guessing it's MoveIt, but I can't be sure.
Please update your ROS logging configuration to include the node name and run everything again.
Something like the following should work:
export ROSCONSOLE_FORMAT='[${severity}] [${time}] [${node}] [${logger}]: ${message}'
Comment by shreyasgan on 2019-04-25:
I updated my ROS logging config, and have updated the error message in the question.
The error seems to be coming from moveit_ros_visualization trajectory_visualiazation
Comment by shreyasgan on 2019-04-25:
I was was looking into what the problem could be, and it could be that I did not configure my moveit workspace properly. I saw https://github.com/ros-planning/moveit/issues/786 online and tried rebuilding moveit from source and not from binary, and the build would not complete.
Comment by gvdhoorn on 2019-04-25:
Why would you build MoveIt from source?
Comment by shreyasgan on 2019-04-25:
I build moveit from source so I can change the "moveit_ros/visualization/robot_state_rviz_plugin/src/robot_state_display.cpp"
file as described in
https://github.com/ros-planning/moveit/pull/846
Comment by gvdhoorn on 2019-04-25:
You are still running Indigo?
Edit: I think we're going to need more information. There could be any nr of causes for the symptoms you describe. The main issue is that MoveIt can't load the robot model (ie: robot_description
and related parameters). If it cannot do that, things won't work.
Comment by shreyasgan on 2019-04-25:
Yes, I am running Indigo with ubuntu 14.04. What other information will you need?
Thank you for helping.
Comment by shreyasgan on 2019-05-09:
Hello, @gvdhoon
I updated my question with new information, please advise on how to get past this.
Thank you for helping