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

karlhm76's profile - activity

2023-06-05 15:09:09 -0500 received badge  Famous Question (source)
2022-10-16 11:07:30 -0500 received badge  Notable Question (source)
2022-10-16 04:42:00 -0500 edited answer ROS environment in Docker with X11

Ok. It took some doing but I was able to get it to work, at least, glxgears works inside a docker container and renders

2022-10-16 04:29:26 -0500 answered a question ROS environment in Docker with X11

Ok. It took some doing but I was able to get it to work, at least, glxgears works inside a docker container and renders

2022-10-15 22:59:59 -0500 commented question ROS environment in Docker with X11

@marguedas Thanks for this. I was able to install rocker and running your command got it to build the image, but it seem

2022-10-10 13:16:55 -0500 received badge  Popular Question (source)
2022-10-09 02:20:45 -0500 commented question ROS environment in Docker with X11

I'll give rocker a try now and see how I go, thanks.

2022-10-09 02:19:56 -0500 commented question ROS environment in Docker with X11

Hi, everything exists on the same machine running focal desktop clean install. I have installed build-essential and dock

2022-10-08 22:35:27 -0500 edited question Docker ROS with X11 output

Docker ROS with X11 output Hi, This seems to be a fairly complicated thing to do. I want to set up a docker ROS develop

2022-10-08 22:10:40 -0500 asked a question Docker ROS with X11 output

Docker ROS with X11 output Hi, This seems to be a fairly complicated thing to do. I want to set up a docker ROS develop

2022-10-08 22:07:43 -0500 asked a question ROS environment in Docker with X11

ROS environment in Docker with X11 Hi, This seems to be a fairly complicated thing to do. I want to set up a docker ROS

2020-05-16 08:35:49 -0500 received badge  Self-Learner (source)
2020-05-16 08:35:49 -0500 received badge  Teacher (source)
2018-02-05 10:10:22 -0500 received badge  Famous Question (source)
2018-02-05 10:10:22 -0500 received badge  Notable Question (source)
2017-11-09 11:46:05 -0500 received badge  Famous Question (source)
2017-11-09 11:46:05 -0500 received badge  Notable Question (source)
2017-04-05 10:52:22 -0500 received badge  Famous Question (source)
2017-03-26 03:03:21 -0500 received badge  Notable Question (source)
2017-03-26 03:03:21 -0500 received badge  Popular Question (source)
2016-12-16 20:36:11 -0500 received badge  Popular Question (source)
2016-11-25 18:44:27 -0500 commented answer joint_states messages different

This is very useful information. Thanks so much

2016-11-25 18:38:02 -0500 received badge  Enthusiast
2016-11-24 03:56:58 -0500 answered a question joint_states messages different

I've decided to look into writing an action server for FollowJointTrajectory.

See how it goes I guess. Thanks again.

2016-11-23 05:15:07 -0500 commented question joint_states messages different

I've been having a few problems with getting started with the trajectory action server and catkin and netbeans. Not relevant here though. Even though I've made good progress with the setup I'm still fairly new at this.

2016-11-23 05:12:38 -0500 commented question joint_states messages different

Thanks for the info. Yes I've been reading about this. I was simply trying to get the thing to work as easily as possible. I was reading that the fake controller published joint states and i already had something that worked with them, or so i thought.

2016-11-22 22:07:45 -0500 asked a question joint_states messages different

Hello,

I have a custom 6DOF arm that I'm trying to interface with moveit. I have created the URDF and the model, and I have loaded it into rviz.

I have made a lot of progress with it I think. I'm using ros indigo on ubuntu 14.04

I subscribe to the joint_states topic on my arduino. Using the arduino code I am able to individually control each joint using the joint state sliders when I run the display.launch

I've completed the moveit configuration and it loads with no problems in rviz, and I can plan movements, etc.

however when my arduino subscribes to the joint_states topic at this point, I get errors in rosserial saying [ERROR] [WallTime: 1479872259.522084] Message from ROS network dropped: message larger than buffer.

What is different with these messages than the ones generated from display.launch?

I performed some investigation and found something interesting:

This is the message from when I use moveit demo.launch

header: 
  seq: 954
  stamp: 
    secs: 1479873407
    nsecs: 957350015
  frame_id: ''
name: ['shoulder_base', 'upper_arm_shoulder', 'elbow_upper_arm', 'forearm_elbow', 'wrist_forearm', 'gripper_wrist', 'left_jaw_gripper', 'right_jaw_gripper']
position: [4.435017290525138e-05, 9.012486469545027e-05, 3.372531827300197e-05, 5.395870120266208e-05, 4.7403243313592324e-05, 0.8750411991072651, 0.0, 0.0]
velocity: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
effort: []

and this is the message when I use display.launch

header: 
  seq: 228
  stamp: 
    secs: 1479873728
    nsecs: 257888078
  frame_id: ''
name: ['shoulder_base', 'upper_arm_shoulder', 'elbow_upper_arm', 'forearm_elbow', 'wrist_forearm', 'gripper_wrist', 'left_jaw_gripper', 'right_jaw_gripper']
position: [0.0, 0.0, 0.0, 0.0, 0.0, 1.2491756999999999, 0.0, 0.0]
velocity: []
effort: []

why the differences, and more importantly, can I make the position data the same data types/precision?

2016-11-14 07:57:56 -0500 received badge  Editor (source)
2016-11-14 07:57:34 -0500 answered a question [RESOLVED] Arduino subscribe to joint_states

I got it working. seems like my baud rate wasn't fast enough.

the arm is also very slow to respond to changes in position. I suppose this is because of the speed of the connection. I am running at 115200.

2016-11-14 07:38:11 -0500 asked a question [RESOLVED] Arduino subscribe to joint_states

Hello,

I have connected my custom built robot arm to my arduino using adafruit PWM. I have tested subscribing to a simple UInt16 topic and manually publishing a message to move a servo. It works.

Now I want to link the arm to rviz. My goal is to use the sliders to move the joints on the screen, and have the real arm move as well.

This does not work at all.

The problem seems to be my callback on the arduino is never called. I have no idea why. It could be because no messages are getting there, but I do echo the joint_states topic in another window and I see the numbers changing as I slide the sliders. I'd expect these to arrive at the arduino as well?

It could be a problem with my arduino code setup, even though it worked with the simple subscription, it may not work with the more complex one. It is below.

Or maybe it is something else entirely.

(I have some problems with joint orientations in my model, with the intention of recalibrating the model properly at some point. So please ignore the dodgy code to convert radians to degrees)

Also I am only attempting to move one servo at this point, which is plugged into the adafruit at position 0, but this relates to joint 5 in the arm.

#include <Servo.h>
#include <ros.h>
#include <std_msgs/UInt16.h>
#include <sensor_msgs/JointState.h>

#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>

ros::NodeHandle nh;
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();

#define SERVOMIN  120 // this is the 'minimum' pulse length count (out of 4096)
#define SERVOMAX  560 // this is the 'maximum' pulse length count (out of 4096)

#define BASE_SERVO 0
#define SHOULDER_SERVO 1
#define ELBOW_SERVO 2
#define FOREARM_SERVO 3
#define WRIST_SERVO 4
#define WRIST_ROLL_SERVO 5
#define GRIPPER_SERVO 6

#define VELOCITY 0.1

double targets[6] = {90,90,90,90,90,90};
double positions[6] = {90,90,90,90,90};

void servo_cb(const sensor_msgs::JointState& cmd_msg)
{
  digitalWrite(13, HIGH);
  targets[0] = radiansToDegrees(cmd_msg.position[5]);
  digitalWrite(13, LOW);

}

ros::Subscriber<sensor_msgs::JointState> sub("joint_states", servo_cb);

void setup()
{
  pinMode(13, OUTPUT);

  pwm.begin();
  pwm.setPWMFreq(60);  // Analog servos run at ~60 Hz updates

  //nh.getHardware()->setBaud(57600);
  nh.initNode();
  nh.subscribe(sub);

  MoveServo(0,90);

}

void loop()
{

  // move towards target at speed velocity
  MoveServo(0, positions[0]);

  if (positions[0] < targets[0])
    positions[0] += VELOCITY;

  if (positions[0] > targets[0])
    positions[0] -= VELOCITY;


  nh.spinOnce();

}

void MoveServo(int servoNumber, double angleInDegrees)
{
  uint16_t pulselength = (uint16_t)map(angleInDegrees, 0, 180, SERVOMIN, SERVOMAX);

  pwm.setPWM(servoNumber, 0, pulselength);
}

double radiansToDegrees(float position_radians)
{

  position_radians = position_radians + 1.6;

  return position_radians * 57.2958;

}
2016-07-15 10:04:00 -0500 received badge  Popular Question (source)
2016-07-06 02:41:48 -0500 commented answer Ros::InvalidNameException on negative radian limit value [Closed]

Renamed the joints and success! Thanks for all the help.

2016-07-06 02:41:03 -0500 received badge  Supporter (source)
2016-07-06 02:41:02 -0500 received badge  Scholar (source)
2016-07-04 16:32:33 -0500 commented answer Ros::InvalidNameException on negative radian limit value [Closed]

Thanks I'll give it a try, i don't want to redo the whole model.

Looking closely i can see now that position 45 in that string is the - in the name. I was thinking it was the value it was referring to.

Cheers!

2016-07-04 16:29:00 -0500 answered a question Ros::InvalidNameException on negative radian limit value [Closed]

Thanks I'll give it a try. I don't want to redo the whole model.

On looking closer, position 45 is the - in the name ot is having the issue at.

Cheers!

2016-07-04 09:22:22 -0500 answered a question Ros::InvalidNameException on negative radian limit value [Closed]

Unless there is an easier way, I think the fastest way to resolve this is to reconstruct my solidworks model so all servos are in the 0 position to begin with, rather than the home position

Then, the home position can be created as a pose later on.

2016-07-04 09:22:21 -0500 asked a question Ros::InvalidNameException on negative radian limit value [Closed]

Hello,

I am at the stage where I can set up moveit and do some motion planning on my custom robot model.

I have executed the moveit setup assistant and specified the URDF with no problems. I generated the package, made it, installed it, etc.

However when I launch the move_group.launch (or the demo.launch as well) I receive this exception:

...: Loading robot model 'Robot_Arm.SLDASM'...
terminate called after throwing an instance of 'ros::InvalidNameException'
what(): Character [-] at element [45] is not valid in Graph Resource Name [/robot_description_planning/joint_limits/Base-Servo2/max_position]. Valid characters are a-z, A-Z, 0-9, / and _.

and then it detects the process has died and I get dumped out.

If I launch the demo.launch, Rviz does load but I get no model shown, and it has an error about NO PLANNING LIBRARY LOADED and there is nothing to select in the dropdown. I have a feeling this may all be related.

This error seems to be because I have set my limits as -x to y radians for my servos. This is necessary I think.

Why doesn't it like negative radian values for limits? And what is the best way to fix this?

I have thought about redesigning my URDF to make servo limits between 0 and 3.1 radians, if it is possible to do this.

<robot
  name="Robot_Arm.SLDASM">
  <link
    name="base_link">
    <inertial>
      <origin
        xyz="0.00071683 0.020356 0.0337"
        rpy="0 0 0" />
      <mass
        value="0" />
      <inertia
        ixx="0"
        ixy="0"
        ixz="0"
        iyy="0"
        iyz="0"
        izz="0" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_arm2/meshes/base_link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.75294 0.75294 0.75294 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_arm2/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>
  <link
    name="Servo2">
    <inertial>
      <origin
        xyz="0.0022691 0.018959 -0.0094813"
        rpy="0 0 0" />
      <mass
        value="0" />
      <inertia
        ixx="0"
        ixy="0"
        ixz="0"
        iyy="0"
        iyz="0"
        izz="0" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_arm2/meshes/Servo2.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.75294 0.75294 0.75294 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_arm2/meshes/Servo2.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Base-Servo2"
    type="revolute">
    <origin
      xyz="0.00012 0.0001411 0.0744"
      rpy="1.5708 0 0" />
    <parent
      link="base_link" />
    <child
      link="Servo2" />
    <axis
      xyz="0 -1 0" />
    <limit
      lower="-1.5"
      upper="1.5"
      effort="0"
      velocity="0" />
  </joint>
  <link
    name="Upper_Arm">
    <inertial>
      <origin
        xyz="-0.0013475 0.053 9.5019E-16"
        rpy="0 0 0" />
      <mass
        value="0" />
      <inertia
        ixx="0"
        ixy="0"
        ixz="0"
        iyy="1.1301E-05"
        iyz="0"
        izz="0" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robot_arm2/meshes/Upper_Arm.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.75294 0 ...
(more)