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

Samper-Esc's profile - activity

2021-10-20 17:17:26 -0500 received badge  Notable Question (source)
2021-10-20 17:17:26 -0500 received badge  Famous Question (source)
2020-05-26 07:49:26 -0500 received badge  Famous Question (source)
2020-04-24 16:12:20 -0500 received badge  Notable Question (source)
2020-03-11 06:01:10 -0500 commented answer Loading controllers from yaml in namespace

Got it working, thank you very much!

2020-03-11 06:00:23 -0500 marked best answer Loading controllers from yaml in namespace

Hi,

(*Using ROS Melodic in Ubuntu)

I am loading a yaml with 4 controllers + joint_state_controller in a namespace. Yaml aspect:

ch1_joint_state_publisher:
  type: "joint_state_controller/JointStateController"
  publish_rate: 50

ch1_controller_ur: 
  type: "effort_controllers/JointEffortController"
  joint: "joint1"

....

Then, I try to spawn them using a controller_manager node. However, the node only finds the rosparam if I explicitly put the namespace, like that:

  <rosparam command="load" file="$(find ch1_simulator)/controllers/wheels_controllers.yaml"
    ns="ch1_controllers"/>
  <node name="ch1_controller_spawner" pkg="controller_manager" type="spawner"
    args= "/ch1_controllers/ch1_joint_state_publisher
    /ch1_controllers/ch1_controller_ur
    /ch1_controllers/ch1_controller_ul
    /ch1_controllers/ch1_controller_br
    /ch1_controllers/ch1_controller_bl"/>

However, the node is not able to find the param by using the --namespace arg:

  <rosparam command="load" file="$(find ch1_simulator)/controllers/wheels_controllers.yaml"
    ns="ch1_controllers"/>
  <node name="ch1_controller_spawner" pkg="controller_manager" type="spawner"
    args= "--namespace=/ch1_controllers 
    ch1_joint_state_publisher
    ch1_controller_ur
    ch1_controller_ul
    ch1_controller_br
   ch1_controller_bl"/>

I would really appreciate any clue about it or what I am missing thereof.

Regards,

J.L Samper

2020-03-02 02:22:15 -0500 received badge  Popular Question (source)
2020-02-29 07:17:38 -0500 received badge  Supporter (source)
2020-02-29 07:15:24 -0500 edited question Loading controllers from yaml in namespace

Loading controllers from yaml in namespace Hi, (*Using ROS Melodic in Ubuntu) I am loading a yaml with 4 controllers +

2020-02-29 07:15:09 -0500 edited question Loading controllers from yaml in namespace

Loading controllers from yaml in namespace Hi, (*Using ROS Melodic in Ubuntu) I am loading a yaml with 4 controllers +

2020-02-29 07:14:45 -0500 edited question Loading controllers from yaml in namespace

Loading controllers from yaml in namespace Hi, (*Using ROS Melodic in Ubuntu) I am loading a yaml with 4 controllers +

2020-02-29 07:14:04 -0500 asked a question Loading controllers from yaml in namespace

Loading controllers from yaml in namespace Hi, (*Using ROS Melodic in Ubuntu) I am loading a yaml with 4 controllers +

2020-02-29 07:00:20 -0500 received badge  Scholar (source)
2019-03-21 19:54:12 -0500 received badge  Student (source)
2017-04-28 07:08:37 -0500 received badge  Notable Question (source)
2017-01-02 06:56:30 -0500 received badge  Famous Question (source)
2016-12-25 16:55:51 -0500 received badge  Self-Learner (source)
2016-12-25 16:55:51 -0500 received badge  Teacher (source)
2016-05-08 15:24:39 -0500 marked best answer Turtlebot simulation crashes when launched

I have installed the software like it is said in the page.

my system info is:

  • ubuntu 12.04
  • ros hydro
  • gazebo 1.9

However when i try to run it:

roslaunch turtlebot_gazebo turtlebot_empty_world.launch

gazebo crashes when he should spawn the bot. The log message i get when this happens is:

Dbg Plugin model name: mobile_base [spawn_turtlebot_model-4] process has finished cleanly log file: /home/samper/.ros/log/e4873b52-135d-11e4-bbd0-109add68f52e/spawn_turtlebot_model-4.log Segmentation fault (core dumped) [gazebo_gui-3] process has died [pid 25180, exit code 139, cmd /opt/ros/hydro/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/home/samper/.ros/log/e4873b52-135d-11e4-bbd0-109add68f52e/gazebo_gui-3.log]. log file: /home/samper/.ros/log/e4873b52-135d-11e4-bbd0-109add68f52e/gazebo_gui-3.log

I don't know why it is happening, other urdf models like shadow hand and arm are working pretty nice.

------------- EDIT -------------

when i check the log files i get this information:

[rospy.client][INFO] 2014-07-24 20:11:12,989: init_node, name[/spawn_turtlebot_model], pid[25187]

[xmlrpc][INFO] 2014-07-24 20:11:12,989: XML-RPC server binding to 0.0.0.0:0

[xmlrpc][INFO] 2014-07-24 20:11:12,990: Started XML-RPC server [http ://samper-MacBookPro:46217/]

[rospy.init][INFO] 2014-07-24 20:11:12,990: ROS Slave URI: [http ://samper-MacBookPro:46217/]

[rospy.impl.masterslave][INFO] 2014-07-24 20:11:12,990: _ready: http ://samper-MacBookPro:46217/

[rospy.registration][INFO] 2014-07-24 20:11:12,991: Registering with master node http ://localhost:11311

[xmlrpc][INFO] 2014-07-24 20:11:12,991: xml rpc node: starting XML-RPC server

[rospy.init][INFO] 2014-07-24 20:11:13,090: registered with master

[rospy.rosout][INFO] 2014-07-24 20:11:13,090: initializing /rosout core topic

[rospy.rosout][INFO] 2014-07-24 20:11:13,093: connected to core topic /rosout

[rospy.simtime][INFO] 2014-07-24 20:11:13,094: initializing /clock core topic

[rospy.simtime][INFO] 2014-07-24 20:11:13,096: connected to core topic /clock

[rosout][INFO] 2014-07-24 20:11:13,098: Loading model xml from ros parameter

[rosout][INFO] 2014-07-24 20:11:13,103: Waiting for service /gazebo/spawn_urdf_model

[rospy.internal][INFO] 2014-07-24 20:11:13,321: topic[/clock] adding connection to [http: //samper-MacBookPro:44259/], count 0

[rospy.internal][INFO] 2014-07-24 20:11:13,363: topic[/rosout] adding connection to [/rosout], count 0

[rosout][INFO] 2014-07-24 20:11:13,406: Calling service /gazebo/spawn_urdf_model

[rosout][INFO] 2014-07-24 20:11:14,467: Spawn status: SpawnModel: Successfully spawned model

[rospy.core][INFO] 2014-07-24 20:11:14,470: signal_shutdown [atexit]

[rospy.internal][INFO] 2014-07-24 20:11:14,477: topic[/rosout] removing connection to /rosout

[rospy.internal][INFO] 2014-07-24 20:11:14,477: topic[/clock] removing connection to http: //samper-MacBookPro:44259/

[rospy.impl.masterslave][INFO] 2014-07-24 20:11:14,477: atexit

2016-04-21 05:20:05 -0500 commented answer Adding a camera to my urdf

Thank you very much

2016-04-21 04:33:46 -0500 commented answer Adding a camera to my urdf

I tried but it says that i need more than 10 points

2015-11-05 08:42:04 -0500 received badge  Famous Question (source)
2015-10-07 08:04:58 -0500 received badge  Popular Question (source)
2015-09-18 18:35:22 -0500 received badge  Popular Question (source)
2015-09-17 08:57:36 -0500 asked a question plug and unplug tool

Hi,

I am looking for a way to plug and unplug a tool to my robot. I have thought about dynamically modifying the joint or obtain the transformation from the world and set the gazebo model position. However, I am not able to get it working.

I would really appreciate if someone could give me any clue.

2015-09-09 04:27:40 -0500 received badge  Notable Question (source)
2015-09-02 08:16:48 -0500 answered a question -J param is not working for robots with more than 6 DOF

I have solved it!

The problem was that the collision mesh of the mobile base that I was using was too heavy. Just had to reduce the number of points with meshlab to 8000 (more or less).

2015-09-02 05:13:43 -0500 asked a question -J param is not working for robots with more than 6 DOF

Hello,

I have a robot that can be described as a robotic arm of 6 DOF attached to a mobile base (train) with 2 DOF. When I try to spawn the robot and set the initial value of the joints doing:

<!-- Spawn a robot into Gazebo -->
<node name="arm_train_spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model schunk_lwa4p_DH_arm_and_train -J Joint_Train_Rail 10" respawn="false" output="screen" />

I have noticed that the train is only spawned at the position 10 of his prismatic joint if the robotic arm has 4 DOF ( 6 DOF of the whole model: 2 from the base + 4 from the arm). I would like to know if there is a way to split this xacro in 2 individual models, invoking them as 2 different robots, and attach one to another ?

Thank you in advance.

JLuis Samper

2015-08-31 05:59:38 -0500 received badge  Notable Question (source)
2015-08-28 11:35:57 -0500 received badge  Popular Question (source)
2015-08-28 11:04:49 -0500 edited question Initial joint angles

Hi,

Is there anyway to set the initial joint angles of the robot ? After reading a lot of pages and some packages of several robots, I have seen that it can be done by adding some args to the spawning node. However, I haven't been able to make it work for me. Right now, what I am doing is:

<node name="arm_base_spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model schunk_lwa4p_and_base 
    -J schunk_lwa4p_and_base::J_foldingSupport 0.075 
    -J schunk_lwa4p_and_base::J1_PowerBall -1.5607 
    -J schunk_lwa4p_and_base::J2_PowerBall -0.3817"
    respawn="false" output="screen" />

The robot is a lwa4p mounted over a mobile platform. For doing that, I am using xacros, being the robot schunk_lwa4p_and_base the union of all the xacros.

I would really appreciate if you can help me. Thank you in advance,

JLuis Samper

2015-08-28 11:03:27 -0500 answered a question Initial joint angles

up .

2015-08-26 04:28:22 -0500 received badge  Popular Question (source)
2015-08-26 03:49:57 -0500 answered a question Adding a camera to my urdf

In case that someone has this problem, i just solved it changing the inertial values. Gazebo has a problem when has to work with small values in the inertial block. Additionally I just omitted the parent tag, it is taken from the joint.

If you need to orientate the position of the optical focus you can do it by the pose property tag of the gazebo plugin

<?xml version="1.0"?>

<robot xmlns:xacro="http://ros.org/wiki/xacro">

  <xacro:property name="M_PI" value="3.1415926535897931" />

  <xacro:macro name="camera_link" params="parent">


    <link name="camera_link">

      <collision>
        <origin xyz="0 0 0" rpy="0 0 0" />
        <geometry>
          <mesh filename="package://sensors_and_actuators/meshes/camara.stl" scale="0.1 0.1 0.1"/>

        </geometry>
      </collision>

      <visual>
        <origin xyz="0 0 0" rpy="0 0 0" />
        <geometry>
          <mesh filename="package://sensors_and_actuators/meshes/camara.stl" scale="0.1 0.1 0.1"/>
        </geometry>
        <material name="grey">
            <color rgba="0.2 0.2 0.2 1.0"/>
        </material>
      </visual>


      <inertial>
        <mass value="0.001" />
        <origin xyz="0 0 0" rpy="0 0 0" />
        <inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001" />
      </inertial>

    </link>



    <joint name="camera_joint" type="fixed">
        <parent link="${parent}"/>
        <child link="camera_link"/>
        <origin rpy="0 0 0" xyz="0.047 0.0 0.0"/>
        <axis xyz="1 0 0" />
    </joint>



    <gazebo reference="camera_link">
      <sensor type="camera" name="camera_camera_sensor">
        <update_rate>30.0</update_rate>
        <camera>
          <pose>0.035 0 0.078 0 ${-M_PI/2} 0</pose>
          <horizontal_fov>${85 * M_PI/180.0}</horizontal_fov>
          <image>
            <format>R8G8B8</format>
            <width>1020</width>
            <height>1020</height>
          </image>
          <clip>
            <near>0.01</near>
            <far>100</far>
          </clip>
        </camera>

        <plugin name="camera_camera_controller" filename="libgazebo_ros_camera.so">
          <alwaysOn>true</alwaysOn>
          <updateRate>0.0</updateRate>
          <cameraName>arm_sensor/camera</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>
2015-08-25 10:02:34 -0500 asked a question Adding a camera to my urdf

Hello,

I am trying to add a camera to the end of an arm using xacros. The camera link URDF is:

<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
  <xacro:macro name="camera" params="parent">
    <link name="camera">
      <collision>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
            <mesh filename="package://sensors_and_actuators/meshes/camara.stl" scale="0.1 0.1 0.1"/>
        </geometry>
      </collision>

      <visual>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
            <mesh filename="package://sensors_and_actuators/meshes/camara.stl" scale="0.1 0.1 0.1"/>
        </geometry>
      </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>

    <joint name="sensor_joint" type="fixed">
        <parent link="${parent}"/>
        <child link="camera"/>
        <origin rpy="0 1.5620 0" xyz="0.0475 0.0 0.0"/>
        <axis xyz="1 0 0" />
    </joint>

    <gazebo reference="camera">
      <sensor type="camera" name="camera_sensor">
        <parent link="camera"/>
        <update_rate>30.0</update_rate>
        <camera>
          <horizontal_fov>1.3962634</horizontal_fov>
          <image>
            <format>R8G8B8</format>
            <width>800</width>
            <height>800</height>
          </image>
          <clip>
            <near>0.01</near>
            <far>100</far>
          </clip>
        </camera>

        <plugin name="${name}_camera_controller" filename="libgazebo_ros_camera.so">
          <cameraName>arm_sensors/camera</cameraName>
          <alwaysOn>true</alwaysOn>
          <updateRate>0.0</updateRate>
          <imageTopicName>image_raw</imageTopicName>
          <cameraInfoTopicName>camera_info</cameraInfoTopicName>
          <frameName>camera</frameName>
        </plugin>
      </sensor>
    </gazebo>

  </xacro:macro>
</robot>

When I run the launch file it reports an error saying that the parent param is missing:

samper@samper:~$ roslaunch cern_tim_arm_simulator arm_tim_simulator.launch spawn_arm:=true robotic_arm:=schunk_lwa4p world:=tunnel spawn_collimator:=true camera_on_arm:=true
... logging to /home/samper/.ros/log/2c17a290-4b39-11e5-b79f-605718079cbb/roslaunch-samper-16690.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):
  File "/opt/ros/indigo/share/xacro/xacro.py", line 60, in <module>
    xacro.main()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 696, in main
    eval_self_contained(doc)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 626, in eval_self_contained
    eval_all(doc.documentElement, macros, symbols)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 552, in eval_all
    (",".join(params), str(node.tagName)))
xacro.XacroException: Parameters [parent] were not set for macro camera
while processing /home/samper/ROS_Workspaces/ROS_Cern/src/ros_cern/tim_gazebo/load_world.launch:
while processing /home/samper/ROS_Workspaces/ROS_Cern/src/ros_cern/robotic_arm/launch/schunk_lwa4p_and_tim.launch:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/share/xacro/xacro.py '/home/samper/ROS_Workspaces/ROS_Cern/src/ros_cern/robotic_arm/arm_description/robots/schunk_lwa4p/schunk_lwa4p_arm_and_tim_camera.urdf.xacro'] returned with code [1]. 

Param xml is <param command="$(find xacro)/xacro.py '$(find robotic_arm)/arm_description/robots/schunk_lwa4p/schunk_lwa4p_arm_and_tim_camera.urdf.xacro'" if="$(arg camera_on_arm)" name="robot_description"/>
The traceback for the exception was written to the log file

I would really appreciate if someone could give me any clue. Thank you in advance.

JLuis Samper

PS: it only works if i delete the <camera> tag and its content

2015-08-25 02:18:00 -0500 received badge  Famous Question (source)
2015-08-24 13:05:57 -0500 commented question Initial joint angles

Setting defaults is sufficient