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

steradiant's profile - activity

2022-10-12 04:43:39 -0500 marked best answer Attaching a sdf model onto a existing urdf model?

I have a existing urdf-model of a robot and I want to attach different things onto the robot arm. Is there a way to combine the existing urdf-model with new sdf models?

2021-03-14 06:56:12 -0500 received badge  Famous Question (source)
2020-12-10 06:04:16 -0500 received badge  Famous Question (source)
2020-11-16 11:56:47 -0500 marked best answer Combining different urdf-files (xarco) e.g. mount camera on robot

Hello, I'm working with the kuka-lwr-ros package and I want to add a camera at the top of the robot. I managed to do this when I directly edited the original kuka_lwr.urdf.xarco file like shown in this tutorial: http://gazebosim.org/tutorials?tut=ro...

For better use, I want to have different files for the sensors and actuators (like camera, gripper and so on). I to copy the urdf.xarco file from an example of this package and edited this one.

<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="single_lwr_robot">

  <!-- Include all models -->
  <xacro:include filename="$(find lwr_description)/model/kuka_lwr.urdf.xacro"/>
  <xacro:include filename="$(find kuka-lwr-gripper)/robot/my_camera.urdf.xacro"/>

  <!-- using the models -->
  <xacro:kuka_lwr name="lwr">
    <origin xyz="0 0 0" rpy="0 0 0"/>
  </xacro:kuka_lwr>

  <xacro:my_camera>
    <origin xyz="0 0 0" rpy="0 0 0"/>
  </xacro:my_camera>

</robot>

The last part (xarco:my_camera ..., and the include of my_camera.urdf.xarco) is my additions. The my_camera.urdf.xarco looks like follows:

<?xml version="1.0"?>
<robot name="my_camera" xmlns:xacro="http://www.ros.org/wiki/xacro">

  <xacro:property name="camera_link" value="0.05" /> <!-- Size of square 'camera' box -->

  <!-- URDF model with default base_link (world) 
  <xacro:macro name="camera" params="name base_link:=world *origin"> -->
  <xacro:macro name="my_camera">

  <!-- height of link_7 is 0.03 -->
  <joint name="camera_joint" type="fixed">
    <!-- <axis xyz="0 0 0" /> -->
    <origin xyz="0 0 0.01" rpy="0 0 0"/>
    <parent link="kuka_lwr_7_link"/>
    <child link="camera_link"/>
  </joint>

  <!-- Camera -->
  <link name="camera_link">
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <geometry>
         <box size="1 ${camera_link} 0.025"/>
      </geometry>
    </collision>

    <visual>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <geometry>
         <box size="${camera_link} ${camera_link} 0.025"/>
      </geometry>
      <material name="red"/>
    </visual>

    <inertial>
      <mass value="1e-5" />
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
    </inertial>
  </link>

      <!-- camera -->
      <gazebo reference="camera_link">
        <sensor type="camera" name="camera1">
          <update_rate>30.0</update_rate>
          <camera name="head">
        <horizontal_fov>1.3962634</horizontal_fov>
        <image>
          <width>800</width>
          <height>800</height>
          <format>R8G8B8</format>
        </image>
        <clip>
          <near>0.02</near>
          <far>300</far>
        </clip>
        <noise>
          <type>gaussian</type>
          <!-- Noise is sampled independently per pixel on each frame.
               That pixel's noise value is added to each of its color
               channels, which at that point lie in the range [0,1]. -->
          <mean>0.0</mean>
          <stddev>0.007</stddev>
        </noise>
          </camera>
          <plugin name="camera_controller" filename="libgazebo_ros_camera.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>0.0</updateRate>
        <cameraName>rrbot/camera1</cameraName>
        <imageTopicName>image_raw</imageTopicName>
        <cameraInfoTopicName>camera_info</cameraInfoTopicName>
        <frameName>camera_link</frameName>
        <hackBaseline>0.07</hackBaseline>
        <distortionK1>0.0</distortionK1>
        <distortionK2>0.0</distortionK2>
        <distortionK3>0.0</distortionK3>
        <distortionT1>0.0</distortionT1>
        <distortionT2>0.0</distortionT2>
          </plugin>
        </sensor>
      </gazebo>


  </xacro:macro>

</robot>

When I launch the launch file with the urdf.xarco from above, I geht the following error:

Unused block "origin" None None
when instantiating macro: my_camera (/home/.../rv_ws/src/kuka-lwr-gripper/robot/kuka-lwr-gripper ...
(more)
2020-05-29 11:57:08 -0500 received badge  Famous Question (source)
2019-09-05 10:20:16 -0500 received badge  Famous Question (source)
2019-08-29 04:50:55 -0500 received badge  Famous Question (source)
2019-07-30 23:58:21 -0500 received badge  Famous Question (source)
2019-07-17 04:24:23 -0500 received badge  Famous Question (source)
2019-06-04 05:39:08 -0500 marked best answer Applying a quaternion rotation to a vector

Hello,

I want to apply a quaternion rotation on a vector e.g. on v_orig = [0,0,1] a q = [0.5,0.5,0.5,0.5] rotation that the rotated vector v_new = [1,0,0]. How is this possible with ROS? Are there any functions to archive this? In the tf2 library I can define quaternions and poses but that doesn't do the thing, as far as I have seen.

The background is, that I have an approach vector in a defined orientation and I want to calculate a point which is e.g. 0.5 m away from the origin in this direction.

2019-06-04 01:18:14 -0500 received badge  Notable Question (source)
2019-06-03 02:59:55 -0500 received badge  Popular Question (source)
2019-06-03 01:08:37 -0500 commented question Applying a quaternion rotation to a vector

I'm using C++

2019-06-03 01:08:26 -0500 commented question Applying a quaternion rotation to a vector

I'm on C++

2019-06-03 01:08:26 -0500 received badge  Commentator
2019-06-02 11:02:37 -0500 asked a question Applying a quaternion rotation to a vector

Applying a quaternion rotation to a vector Hello, I want to apply a quaternion rotation on a vector e.g. on v_orig = [0

2019-05-23 01:27:31 -0500 received badge  Famous Question (source)
2019-04-20 08:11:33 -0500 received badge  Notable Question (source)
2019-04-20 00:17:34 -0500 commented answer joint_.setCommand(commanded_effort) in the joint_position_controller

The command is set to where cmd_ points to. But I wasn't able to dig deeper whats happening with this cmd_

2019-04-19 19:48:26 -0500 received badge  Popular Question (source)
2019-04-19 13:49:33 -0500 commented question joint_.setCommand(commanded_effort) in the joint_position_controller

I've updated my post now. Hope it is kinda clear what I'm asking.

2019-04-19 13:48:57 -0500 edited question joint_.setCommand(commanded_effort) in the joint_position_controller

joint_.setCommand(commanded_effort) in the joint_position_controller Hello, I'm looking through the code of ros_control

2019-04-18 20:25:14 -0500 received badge  Student (source)
2019-04-18 14:25:20 -0500 asked a question joint_.setCommand(commanded_effort) in the joint_position_controller

joint_.setCommand(commanded_effort) in the joint_position_controller Hello, I'm looking through the code of ros_control

2019-04-18 14:20:30 -0500 marked best answer Code completion Clion

Hello, I'm working with Clion to write C++ code for ROS. I just started with a simple publisher which publishes a message of the type

geometry_msgs::Pose msg;

When I want to do code completion, Clion tells me 'No suggestions for members of geometry_msgs::Pose. It also tells me, that

#include "geometry_msgs/Pose.h"

is not found. The code compiles and works fine though. How can I get the code completion for a easier code writing working?

2019-04-18 14:20:01 -0500 received badge  Notable Question (source)
2019-04-18 03:46:03 -0500 commented question Code completion Clion

Thanks! Seems to work now

2019-04-18 00:00:37 -0500 commented question Code completion Clion

Yes, I've tried that but it didn't work.

2019-04-18 00:00:14 -0500 received badge  Popular Question (source)
2019-04-17 10:22:24 -0500 asked a question Code completion Clion

Code completion Clion Hello, I'm working with Clion to write C++ code for ROS. I just started with a simple publisher wh

2019-04-07 13:14:04 -0500 received badge  Famous Question (source)
2019-04-07 11:54:18 -0500 commented answer Combining URDF-files with tf (static_transform)

Thanks for the answer! I've already tried one single URDF-model and I also know this post (related post) but I run into

2019-04-05 14:24:10 -0500 received badge  Notable Question (source)
2019-04-04 00:29:06 -0500 commented question Combining URDF-files with tf (static_transform)

No, I don't get this error. The launch file starts without errors for me. Have you installed ros_control? If not, pleas

2019-04-03 00:18:45 -0500 received badge  Notable Question (source)
2019-04-01 07:00:04 -0500 commented question Combining URDF-files with tf (static_transform)

I made a github project (I hope everything runs; it's my first time I pushed a project myself). https://github.com/stera

2019-04-01 03:45:41 -0500 received badge  Popular Question (source)
2019-04-01 02:21:32 -0500 commented question Combining URDF-files with tf (static_transform)

Yes, they are in different packages (the URDF for the robot and the URDF for the gripper; in the same catkin ws though)

2019-03-30 14:21:32 -0500 asked a question Combining URDF-files with tf (static_transform)

Combining URDF-files with tf (static_transform) Hello, I'm struggling with combining different urdf files (robots). I ha

2019-03-28 11:50:05 -0500 received badge  Notable Question (source)
2019-03-27 17:02:27 -0500 received badge  Notable Question (source)
2019-03-27 13:55:35 -0500 edited question Exception thrown while initializing controller - Could not find resource '' in 'hardware_interface::EffortJointInterface'

Exception thrown while initializing controller - Could not find resource '' in 'hardware_interface::EffortJointInterfac

2019-03-27 13:55:00 -0500 edited question Exception thrown while initializing controller - Could not find resource '' in 'hardware_interface::EffortJointInterface'

Exception thrown while initializing controller - Could not find resource '' in 'hardware_interface::EffortJointInterfac

2019-03-26 14:44:49 -0500 received badge  Popular Question (source)
2019-03-26 14:43:45 -0500 received badge  Notable Question (source)
2019-03-26 02:53:40 -0500 received badge  Notable Question (source)
2019-03-25 15:10:34 -0500 edited question Exception thrown while initializing controller - Could not find resource '' in 'hardware_interface::EffortJointInterface'

Exception thrown while initializing controller - Could not find resource '' in 'hardware_interface::EffortJointInterfac

2019-03-25 14:56:33 -0500 asked a question Exception thrown while initializing controller - Could not find resource '' in 'hardware_interface::EffortJointInterface'

Exception thrown while initializing controller - Could not find resource '' in 'hardware_interface::EffortJointInterfac

2019-03-25 04:00:43 -0500 received badge  Popular Question (source)