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

sisko's profile - activity

2023-06-12 01:36:19 -0500 received badge  Famous Question (source)
2023-05-25 14:07:00 -0500 received badge  Notable Question (source)
2023-05-25 14:07:00 -0500 received badge  Popular Question (source)
2023-05-25 14:07:00 -0500 received badge  Famous Question (source)
2023-04-10 17:10:40 -0500 marked best answer Custom action goal: "has no attribute" error

I have created a custom action called TakePosition.action with the following data :

#goal
int64 x
int64 y
int64 z
string position
---
#result
bool completed
---
#feeback
string report

When I try using my TakePositionActionGoal in my client.py script, I get an error saying :

  File "/home/sisko/catkin_ws/devel/lib/python2.7/dist-packages/sweepbot_tools/msg/_TakePositionActionGoal.py", line 122, in serialize
    buff.write(_get_struct_3q().pack(_x.goal.x,
_x.goal.y, _x.goal.z)) AttributeError: 'TakePositionActionGoal' object has no attribute 'x'

Here's my client.py script :

#! /usr/bin/env python
from __future__ import print_function

import rospy
from sweepbot_tools.msg import TakePositionAction, TakePositionActionGoal

import actionlib

def setPosition():
    client = actionlib.SimpleActionClient('sweepbot_movebase_server', TakePositionAction)

    client.wait_for_server()

    goal = TakePositionActionGoal()
    goal.goal.x = 7
    goal.goal.y = 7
    goal.goal.z = 7
    goal.goal.position = ''

    client.send_goal(goal)

    client.wait_for_result()

    return client.get_result()

if __name__ == '__main__':
    try:
        rospy.init_node('sweepbot_movebase_client')
        result = setPosition()
        rospy.logdebug(result)
    except rospy.ROSInterruptException:
        print("program interrupted before completion", file=sys.stderr)

The porpose is to create pose data which I can pass to my custom action server which would calls move_base with the recieved pose.

Clearly there is an x attribute in my action definition. I don't understand what the souce of this error is.

2023-04-06 03:02:22 -0500 received badge  Famous Question (source)
2023-03-31 02:38:40 -0500 received badge  Famous Question (source)
2023-03-14 08:35:50 -0500 received badge  Notable Question (source)
2023-03-14 08:35:50 -0500 received badge  Popular Question (source)
2023-03-14 08:35:50 -0500 received badge  Famous Question (source)
2023-02-15 02:53:44 -0500 received badge  Notable Question (source)
2023-02-15 02:53:44 -0500 received badge  Famous Question (source)
2023-01-02 15:12:14 -0500 received badge  Notable Question (source)
2022-12-26 11:29:08 -0500 received badge  Notable Question (source)
2022-12-26 11:29:08 -0500 received badge  Famous Question (source)
2022-11-16 15:20:50 -0500 received badge  Famous Question (source)
2022-10-12 04:45:50 -0500 marked best answer Moveit limited full joints explanation

I'm running the moveit launch files at https://github.com/ros-industrial/uni... . The last set of instructions have the following instructions:

As MoveIt! seems to have difficulties with finding plans for the UR with full joint limits [-2pi, 2pi], there is a joint_limited version using joint limits restricted to [-pi,pi].

Can someone please help me understand what that means?

2022-10-12 04:45:02 -0500 received badge  Notable Question (source)
2022-10-12 04:45:02 -0500 received badge  Popular Question (source)
2022-10-12 04:45:02 -0500 received badge  Famous Question (source)
2022-05-30 11:40:54 -0500 marked best answer Ros publisher message type for arrays

Can someone please tell me what message-type to use in publishing the following array?:

[
  ['/turtle1/color_sensor', 'turtlesim/Color'], 
  ['/client_count', 'std_msgs/Int32'], 
  ['/rosout', 'rosgraph_msgs/Log'], 
  ['/rosout_agg', 'rosgraph_msgs/Log'], 
  ['/connected_clients', 'rosbridge_msgs/ConnectedClients'], 
  ['/all_topics', 'std_msgs/String'], 
  ['/turtle1/cmd_vel', 'geometry_msgs/Twist'], 
  ['/turtle1/pose', 'turtlesim/Pose']
]

I'm reacquainting myself with ROS and learning the basics as I modify a basic talker to publish the array above instead of a string. I have consulted documentation but I'm having difficulty figuring out which of those message types to use, if any.

publisher = rospy.Publisher('/all_topics', ???, queue_size=1)

2022-05-19 02:41:13 -0500 received badge  Notable Question (source)
2022-04-25 02:43:08 -0500 marked best answer Reducing the speed/velocity of a UR5

I'm executing the ros-industrial launch files on a real UR5 robot but I would like to reduce the speed at which it executes my moveit plans.

Can anyone advice how I can do that from a python package, please?

2022-04-14 08:22:15 -0500 received badge  Popular Question (source)
2022-04-14 08:22:15 -0500 received badge  Famous Question (source)
2022-04-14 08:22:15 -0500 received badge  Notable Question (source)
2022-03-28 02:16:22 -0500 marked best answer URDF spawn into Gazebo world error

How can I spawn a URDF into a custom Gazebo world, preferably using a launch file?

My task is to launch my custom Gazebo world which has a DEM of Mongolia. I also have to spawn a URDF of a robot into the same Gezebo instance.

For the DEM, I followed this tutorial. Which worked well for me. But then I tried the following command to try spawning my robot:

ubuntu@ubuntu:~/catkin2_ws/src/my-robot$ rosrun gazebo_ros spawn_model -file urdf/01-myfirst.urdf -urdf -z 1 -model my_test

The terminal only shows the following output and nothing else happens:

SpawnModel script started
[INFO] [1511782992.386535, 0.000000]: Loading model XML from file
[INFO] [1511782992.388399, 0.000000]: Waiting for service /gazebo/spawn_urdf_model

When I stop the terminal, i:e Ctrl + C, I get the following output:

>     ^CTraceback (most recent call last):
>       File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model",
> line 313, in <module>
>         sm.callSpawnService()
>       File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model",
> line 271, in callSpawnService
>         initial_pose, self.reference_frame,
> self.gazebo_namespace)
>       File "/opt/ros/kinetic/lib/python2.7/dist-packages/gazebo_ros/gazebo_interface.py",
> line 28, in spawn_urdf_model_client
>         rospy.wait_for_service(gazebo_namespace+'/spawn_urdf_model')
>       File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py",
> line 159, in wait_for_service
>         raise ROSInterruptException("rospy
> shutdown")
>     rospy.exceptions.ROSInterruptException:
> rospy shutdown

Can anyone help me resolve this issue, please?

My package has the following structure:

.
├── CMakeLists.txt
├── launch
│   └── mongolia.launch
├── mongolia_129.dem
├── mongolia.world
├── package.xml
└── urdf
    └── 01-myfirst.urdf

*PS: *

This work fine if I execute:

ubuntu@ubuntu:~/catkin2_ws/src/my-robot$ roslaunch gazebo_ros empty_world.launch
2022-03-17 10:02:43 -0500 marked best answer Transforming in combined tree

I have a task of using a static ur5 manipulator to detect and point at a mobile turtlebot. I am a beginner and I'm told transforms is the solution I want. (Please comment if you disagree).

I have a ur5 and a turtlebot3 spawned into a an empty gazebo world.

I have a static transform publisher, shown below, in my launch file which I use to combine the tf trees of both robots.

<node pkg='tf2_ros' type='static_transform_publisher' name='ur5_turtlebot3_transform' args='0 0 0 0 0 0 1 world odom'/>

So the merged tf tree is as follows: image description

The green bordered section on the right of the image is the turtlebot3 tf tree. Everything else is the ur5 tf tree. As my static transform code shows, I attached the turtlebot tree to the ur5 tree at the world node.

Further down the ur5 tree I highlighted in red the wrist_3_link node which is the node of origin for my attempted transform. The destination node is the base_footprint node, the second and last node on the turtlebot3 side of the tree.

However, my can_transform attempts at return 0 (false). So as you would expect lookup_transforms errors:

def __init__(self):

    # declarations
    self.robot = moveit_commander.RobotCommander()
    self.scene = moveit_commander.PlanningSceneInterface()
    self.manipulator = moveit_commander.MoveGroupCommander('ur5_bot')

    self.tf_buffer = tf2_ros.Buffer()
    self.tf_listener = tf2_ros.TransformListener(self.tf_buffer)

    try:
        # transform_stamped = tf_buffer.lookup_transform('wrist_3_link', 'base_footprint', rospy.Time())
        transform_stamped = self.tf_buffer.can_transform('wrist_3_link', 'base_footprint', rospy.Time())
        rospy.loginfo(transform_stamped)
    except (tf2_ros.LookupException, tf2_ros.ConnectivityException, tf2_ros.ExtrapolationException) as e:
        rospy.logerr(e)

And, just to test, I tried a can_transform between nodes entirely on the ur5 side of the tree, i:e base_link to world, but still the result was false.

I'm not sure what I'm missing and/or doing wrong. I would appreciate some help.

2022-02-17 13:44:11 -0500 received badge  Famous Question (source)
2022-02-09 01:35:56 -0500 received badge  Famous Question (source)
2022-02-07 11:42:47 -0500 received badge  Famous Question (source)
2022-02-02 07:23:55 -0500 received badge  Notable Question (source)
2022-01-08 15:23:30 -0500 received badge  Famous Question (source)
2022-01-08 15:23:30 -0500 received badge  Notable Question (source)
2022-01-08 15:23:30 -0500 received badge  Popular Question (source)
2021-12-26 22:20:24 -0500 received badge  Famous Question (source)
2021-12-26 22:20:24 -0500 received badge  Notable Question (source)
2021-12-05 23:36:39 -0500 received badge  Notable Question (source)
2021-11-19 08:51:49 -0500 received badge  Famous Question (source)
2021-11-10 23:01:21 -0500 received badge  Famous Question (source)
2021-11-07 16:08:05 -0500 received badge  Popular Question (source)
2021-10-29 04:06:42 -0500 received badge  Famous Question (source)
2021-10-13 08:25:31 -0500 received badge  Famous Question (source)
2021-09-27 19:57:39 -0500 received badge  Famous Question (source)
2021-09-27 19:51:05 -0500 received badge  Famous Question (source)
2021-09-27 19:47:29 -0500 received badge  Notable Question (source)
2021-09-27 19:29:03 -0500 received badge  Popular Question (source)
2021-09-27 19:20:42 -0500 received badge  Notable Question (source)