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

RosBort's profile - activity

2016-11-22 19:12:19 -0500 received badge  Famous Question (source)
2015-06-02 05:20:36 -0500 received badge  Famous Question (source)
2015-05-18 07:45:00 -0500 received badge  Taxonomist
2015-02-23 17:00:14 -0500 received badge  Notable Question (source)
2015-02-16 05:43:31 -0500 received badge  Famous Question (source)
2015-01-02 22:57:07 -0500 received badge  Popular Question (source)
2014-12-30 06:54:49 -0500 received badge  Famous Question (source)
2014-11-26 13:06:07 -0500 received badge  Famous Question (source)
2014-11-26 12:51:06 -0500 marked best answer Change type sensor_msgs/joint_states to JointMessage

Hello!

My Node is subscribing to a ROS-Node that publishes sensor_msgs/joint_state. Now I would like to send this data via the simple_message Protocol using TCP/IP to my robot controller. My goal is to subsribe to the topic "joint_states" which, as I so far understood, is often used for sending actual robot positions and send it over TCP/IP using the "simple_message" protocol.

So there are two possibilities for me: Get "joint_states" to "simple_message" directly and send it. or Convert "joint_states" to "JointMessage" which is part of the "simple_message" Package and send it.

The Communication already works. I followed a ROS-I-Tutorial, which I am not able to find again at the moment. What the robot controller receives is not important yet. For now a dummy node prints the sequence of the simple message to the screen and this works for the first.

May someone have an idea.

Here is my code-snippet:

while(client.isConnected())
{

    ros::spinOnce();
    ROS_INFO_STREAM("POS1 = " << globalJointState.position[1]);

    // Create a message of type JointMessage and corresponding simple message
    industrial::joint_message::JointMessage jmReq;
    industrial::simple_message::SimpleMessage req, reply;

    jmReq.setSequence(globalJointState.header.seq);
    //jmReq.addAllDataIwishForMyJointMessage(outOffMyGlobalJointStates);
    jmReq.toRequest(req);


    ROS_INFO_STREAM("Sending sequence: " << globalJointState.header.seq << " to " << LOCAL_HOST << ":" << TCP_PORT);

    client.sendAndReceiveMsg(req, reply);

    ROS_INFO_STREAM("Received reply code: " << reply.getReplyCode());

    ros::Duration(1).sleep();


}
2014-11-25 05:06:54 -0500 asked a question Port Questions and (Initial) Feedback from Controller via Simple Message - ROS-I

Hello ROS-Community!

I would still like to use my computer (Matlab, Simulink, C++) like a "controller" and therefor write a little driver. It is not yet necessary to run it on the real B&R Controller or to have some robot included yet. This is a goal for me to reach, at least for some better understanding. And I think I am pretty close to the solution.

So what I do on the ROS-Side: I roslaunch industrial_robot_client robot_interface_streaming.launch and it connects to my "controller". No further Error or Warnings, etc. My Controller runs at the moment Hercules as a server that listens to Port 11000. Afterwards I run my modified test_move.py. The changes are only because of the joint names, but more information can be found in one of my questions I got solved here earlier. If I rosrun anypkg test_move it works and finishes but I get an error message on the tab where I roslaunched before from the action node:

[ERROR] [1416913963.582113224]: Joint trajectory action rejected: waiting for (initial) feedback from controller

We had this once earlier, if you follow to the mode of test_move, but now I am on to write my small "conroller"-specific driver. How do I need to build up an initial feedback for my laptop of a fake feedback and on which ports do I need to send them?

Edit: If I wait long enough after the roslaunch I get this error message, which I may should look to work out first:

[ERROR] [1416915304.267290322]: Failed to connect to server, rc: -1. Error: 'Connection timed out' (errno: 110)

I also get it if I do roslaunch and afterwards rosrun: I get the first error message first and some time later the next. Hercules thereby states that the Connection is established? Maybe some problems with the ports?

As I found out over WireShark there are two ports in use when launching the robot_interface_streaming.launch.

  • 11000
  • 11002

Why and how to use those, like what should be used to receive or send on which node?

2014-11-25 04:41:12 -0500 commented answer ROS-I Computer - Recommended RT - Operating System

That's some good information! Thank you! I am waiting a little more, may there are some more people who'd like to give me feedback, before closing this question. I now added on my imagination of realtime by editing my Question in the last line.

2014-11-24 06:54:46 -0500 received badge  Notable Question (source)
2014-11-24 03:53:29 -0500 received badge  Popular Question (source)
2014-11-22 11:15:40 -0500 asked a question ROS-I Computer - Recommended RT - Operating System

As far as I found out there are three ways to send data to an industrial robot:

  1. Point Streaming
  2. Trajectory Streaming (like Point Streaming but with velocities added to the stream)
  3. Trajectory Downloading

The third point as I understood needs collision detection already before downloading the trajectory. So this is not ment for heterogenous environments?

The first and the second points are quite equal i guess. ROS-I on my PC can do on-the-fly-visualization and collision detection in realtime. What operating System on my PC/Laptop is needed for being able to use the realtime capabilities of ROS-I? Especially the collision detection? Is RTAI necessary or strong enough? Or is there any recommended RT-upgrade to any specific linux system?

What connection is needed? I guess Ethernet via TCP/IP won't do. Would EtherCAT be usable?

Regards

Edit: My Imagination of realtime is yet hard to explain. But to be not too specific, I would rather like to know how realtime ROS-I is. What update rates are possible with ROS-I?

2014-11-12 22:30:00 -0500 received badge  Notable Question (source)
2014-11-12 00:12:27 -0500 received badge  Popular Question (source)
2014-11-11 11:09:50 -0500 asked a question ROS-I Drivers - On which platforms do ROS and ROS-I run?

Hello there!

Some time passed since my last approach here, there were other things of higher priority to do so far. There is one more question I would like to clarify, which I didn't fully understand yet.

When browsing several drivers for the ROS-I Vendors, the data scheme pretty looks similar to the one of ROS. For instance the Motman Driver. Also the ABB, etc.

On which platforms do ROS and ROS-I run when connecting to an industrial robot controller?

For me I figured out the following:

  • PC: ROS and ROS-I
  • Controller: Some machine-language-specific driver

When I accord to the install tutorial of the ABB am I installing ROS-I on the controller in order to get the specific driver to run? I don't guess this is the clue of ROS-I. This is more or less how to use the controller-language-specific driver, that it interacts with ros?

Jeremy Zoss states in this Video at Minute 3:13, that a minimum requirement would be to write a programm that fulfills the communication issues is "enough". I interpret this as a controller-specific-code (the driver for ROS-I) that one needs to implement when connecting to a new controller. The graphic that he uses is in his presentation I interpret like my idea written above. (Once again:

  • PC: ROS and ROS-I
  • Controller: Some machine-language-specific driver

)

Or what it looks to me: - PC: ROS and ROS-I - Controller: Some ROS-I Version specifically changed for the controller and some machine-language-specific driver

So do I understand right?

2014-10-22 14:38:45 -0500 commented answer Rename JOINT_NAMES in ur_driver test_move.py

I am following the bug report of ROS-I. What does it mean to reject a goal?

2014-10-22 05:35:09 -0500 commented answer Rename JOINT_NAMES in ur_driver test_move.py

Ok it was not so much to read and not too complicated. It seems like there is no workaround at the moment without one of the ROS-I controllers with the specific drivers. I guess you also don't know if something will be done? How can I do something?

2014-10-22 05:17:07 -0500 commented answer Rename JOINT_NAMES in ur_driver test_move.py

This is really usual for me running into a bug, but thanks god you told me. I need some time to read through this. I wanted to give an answer this time and start a new question. But how it is in the life of a technician four hours are nothing compared to our projects and pass much too fast.

2014-10-22 04:05:38 -0500 received badge  Notable Question (source)
2014-10-22 03:40:15 -0500 received badge  Commentator
2014-10-22 03:40:15 -0500 commented answer Rename JOINT_NAMES in ur_driver test_move.py

I did how you said. I am updating my answer at the moment for better understandability.

2014-10-22 01:42:40 -0500 received badge  Popular Question (source)
2014-10-21 14:07:02 -0500 commented answer Rename JOINT_NAMES in ur_driver test_move.py

Parts of the errormessage of both procedures that I forgot:

joint_trajectory_action: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->() const [with T = const control_msgs::FollowJointTrajectoryFeedback_<std::allocator<void> >]: Assertion `px != 0' failed.
2014-10-21 14:02:04 -0500 answered a question Rename JOINT_NAMES in ur_driver test_move.py

For solving my problem I split it up in two approaches:

  1. Copy test_move.py into my own package and change the joint names, as well as the topic name it advertises.
  2. Use features that are already implemted in ROS-I and do needed changes via launch file.

Informations that are important for both approaches: Out of a joint_names.yaml, which I found here, I got the names the Joints should have.

The first approach: I copied the test_move.py in a package created by myself and got it to run with changing the JOINT_NAMES and the topic advertised. Here are the lines I modified:

JOINT_NAMES = ['joint_1', 'joint_2', 'joint_3', 'joint_4', 'joint_5', 'joint_6']
client = actionlib.SimpleActionClient('joint_trajectory_action', FollowJointTrajectoryAction)

And I call it with these commands:

roscore
roslaunch industrial_robot_client robot_interface_streaming.launch robot_ip:=192.168.0.101
rosrun rospy_pkg test_move

This for the first works! But results in an error message listed bellow in this question.

The second approach: Later on I found here, that the process of copying the test_move.py and modify it is not necessary. One can use the original test_move.py in the ur_driver package and set the rosparam controller_joint_names. It will have the same effect as writing an own modified test_move.py.

<launch>
   <arg name="robot_ip" />
   <param name="/robot_ip_address" type="str" value="$(arg robot_ip)"/>
   <rosparam param="controller_joint_names">['shoulder_pan_joint', 'shoulder_lift_joint', 'elbow_joint','wrist_1_joint', 'wrist_2_joint', 'wrist_3_joint']</rosparam>

   <node pkg="industrial_robot_client" type="robot_state" name="robot_state"/>
   <node pkg="industrial_robot_client" type="motion_streaming_interface" name="motion_streaming_interface"/>
   <node pkg="industrial_robot_client" type="joint_trajectory_action" name="joint_trajectory_action">
      <remap from="joint_trajectory_action/feedback" to "follow_joint_trajectory/feedback"/>
   </node>
   <node pkg="ur_driver" type="test_move.py" name="follow_joint_trajectory">
      <remap from="follow_joint_trajectory/cancel" to="/joint_trajectory_action/cancel"/>
      <remap from="follow_joint_trajectory/goal" to="/joint_trajectory_action/goal"/>
      <remap from="follow_joint_trajectory/result" to="/joint_trajectory_action/result"/>
      <remap from="follow_joint_trajectory/status" to="/joint_trajectory_action/status"/>
   </node>
</launch>

This also works! But results in the same error message as approach nr. 1 mentioned above. Here is the error message:

[joint_trajectory_action-X] process has died [pid 19413, exit code -6, cmd /opt/ros/hydro/lib/industrial_robot_client/joint_trajectory_action

So far I found out it has to do with the remapping of the the .../feedback topic. Attention! In Version Nr. 2 I do a remapping in the launch file. In Version Nr. 1 it is done by ROS-I automatically. Any ideas what and why it happens?

2014-10-21 13:14:11 -0500 received badge  Enthusiast
2014-10-20 11:27:32 -0500 received badge  Student (source)
2014-10-20 11:11:13 -0500 marked best answer Convert trajectory_msgs/JointTrajectoryPoint to industrial::joint_traj_pt(_message)::JointTrajPt(Message)

This time I hope I am on the right way, because in my last question I wasn't.

So I built up a Joint-Trajectory publisher that publishes trajectory_msgs::JointTrajectoryPoint to the topic joint_path_command. For the first I fill the position, velocities and accelerations with 3 fixed random values each as well as time_from_start and just publish it to the topic.

My first question is, is this the right procedure? I didn't find an existing simulation yet, that publishes a trajectory_msgs::*. Because where I get my message from is at the moment not important to my project. In detail I tinkered about with the Universal Robot of the industrial package. But I wasn't able to get a message out of the Rviz simulation that I could use to subscribe to. EDIT: After having again a closer look, i found the arm_controller/command in the UR5 which publishes trajectory_msgs::*. So right now I think I am doing right.

My next and furthermore annoying problem ist converting a trajectory_msgs/JointTrajectoryPoint to an industrial::joint_traj_pt(_message)::JointTrajPt(Message). As my publisher publishes a trajectory_msgs::JointTrajectoryPoint after subscribing I get this format. As I want to use the simple_message package of ROS-I, I need some kind of conversion between these file formats. Does something like this exist?

Somehow I don't get the connection (in my mind!) between ROS and ROS-I. Should my simulation (publisher) already publish industrial::joint_traj_pt(_message)::JointTrajPt(Message)? Or am I doin' fine?


Edit 1: The overall task is to move a Quanser Robot connected to a B&R Controller with the industrial core of ROS. My task in this is to make a connection between the simulation, that doesn't exist yet and the controller, or in detail, any controller. For me this is for instance matlab receiving my simple message which i deserialize (this should be the right word) and send to a Forward-Kinematics Block . The "Receiver" will be programmed in C in order to be able to run it on most actual controllers and also on Matlab, due this is neccessary for testing my Ros-Implementation.

Regards, RosBort


Edit 2: I now run roslaunch industrial_robot_client robot_interface_streaming.launch robot_ip:=192.168.0.102 But how can I now publish something, a test-message, that will be sent to my "controller". In this case on my controller I am waiting with wireshark and Hercules in order to receive any information. I understood that simple_message called viae the upper mentioned package wants a reply. But first it sends some information and then waits for the reply. I would like to see this first information on my Wireshark or Herkules.

I made a try using the UR5 from Universal Robots.

roslaunch ur_gazebo ur5.launch limited:=true

roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true limited:=true

roslaunch ur5_moveit_config moveit_rviz.launch config:=true

The second and the third call show some error messages, which I don't want to discuss here. The second at the end tells me that all is fine, this is quite ...

(more)
2014-10-20 11:11:12 -0500 commented answer Convert trajectory_msgs/JointTrajectoryPoint to industrial::joint_traj_pt(_message)::JointTrajPt(Message)

@gvdhoorn: Understood :)

2014-10-20 11:10:44 -0500 received badge  Scholar (source)
2014-10-20 11:10:41 -0500 received badge  Supporter (source)
2014-10-20 11:02:24 -0500 edited question Rename JOINT_NAMES in ur_driver test_move.py

I rosrun ur_driver test_move.py and would like to change the names of the joints which used. Originally they are initialized in the test_move.py, sadly I can't just edit this file, so I would like to find out if I can do this maybe with a launch file.

In test_move.py the joint names are saved in a character array like this:

JOINT_NAMES = ['shoulder_pan_joint','shoulder_lift_joint',...]

The overall question: Can I effect the names of the joints via a launchfile. If yes how and if not, are there other ways to effect it.

My thoughts are about a Launch-File like this:

<node pkg="ur_driver" type="test_move.py" name="follow_joint_trajectory">
<param name="JOINT_NAMES" value="['J0','J1',...]"/>
</node>

EDIT 1: During writing I may already obtained my answer. I need to check at home. If you probably know something important to know about please feel free as to answer me. I am not sure about how to write value="['J0','J1',...]" in an exact way. I still get an error.

EDIT 2: So far I tried about and read the information about the <param> tag, but as I understand it is not changing the variables used within the file. And there was also no reaction yet. This is my launch file: <launch>

<arg name="robot_ip" />

<param name="/robot_ip_address" type="str" value="$(arg robot_ip)"/>

<node pkg="industrial_robot_client" type="robot_state" name="robot_state"/>

<node pkg="industrial_robot_client" type="motion_streaming_interface" name="motion_streaming_interface"/>

<node pkg="industrial_robot_client" type="joint_trajectory_action" name="joint_trajectory_action"/>

<node pkg="ur_driver" type="test_move.py" name="follow_joint_trajectory">
    <param name="JOINT_NAMES" value="['J0','J1','J2','J3','J4','J5']"/>
    <remap from="follow_joint_trajectory/cancel" to="/joint_trajectory_action/cancel"/>
    <remap from="follow_joint_trajectory/feedback" to="/joint_trajectory_action/feedback"/>
    <remap from="follow_joint_trajectory/goal" to="/joint_trajectory_action/goal"/>
    <remap from="follow_joint_trajectory/result" to="/joint_trajectory_action/result"/>
    <remap from="follow_joint_trajectory/status" to="/joint_trajectory_action/status"/>
</node></launch>

Is there a way to change this on the fly or do I need to build the test_move.py in a new package with the right names?