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

Craig's profile - activity

2018-11-29 01:39:58 -0500 received badge  Good Question (source)
2018-04-29 22:10:14 -0500 marked best answer Mapping between PWM counts and joint angle in ros_canopen

I'm using ros_canopen, which is an awsome package, to communicate with my robot.

By far, I modified the below yaml parameters to deal with the mapping between PWM counts and jont angle.

default:
  pos_to_device: "rint(rad2deg(pos)*1000)"
  pos_from_device: "deg2rad(obj6064)/1000" 
  vel_to_device: "rint(rad2deg(vel)*1000)" 
  vel_from_device: "deg2rad(obj606C)/1000"

Is there a way to use transmission ratio in URDF and define only a parameter of encoder resolution in the above yaml?

Thank you in advance.

2017-11-28 13:00:09 -0500 marked best answer ros_canopen did not receive a response message

Hi, I trying to use ros_canopen to control a robot with canopen motors. I use indigo.

I run candump in a terminal. When I connect the motor to power,candump receives:

~/ws $ rosrun socketcan_interface socketcan_dump can0
ERROR: state=1 internal_error=0('OK') asio: system:0
ERROR: state=2 internal_error=0('OK') asio: system:0
s 702   1 0
s 82    8 30 81 0 0 0 40 0 0

So I suppose the hardware connection is correct.

However when I load parameters and then run canopen_motor_node , it gave an error:

$ rosrun canopen_motor_node canopen_motor_node 

[ WARN] [1462871551.731234857]: Sync overflow was not specified, so overflow is disabled per default

Did not receive a response message

[ERROR] [1462871553.457722242]: 
/home/craig/ws/src/ros_canopen/canopen_master/include/canopen_master/objdict.h(457): Throw in function canopen::ObjectStorage::Entry<T> canopen::ObjectStorage::entry(const canopen::ObjectDict::Key&) [with T = signed char]
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::bad_cast> >
std::exception::what: std::bad_cast

The configuration of CAN bus is simple and is Here.The eds is provided by Copley.

I've tried to read the code where produces the "Did not receive a response message" but could find out how to solve this problem.

Any help will be appreciated .Thank you.

2017-11-15 19:15:09 -0500 received badge  Stellar Question (source)
2017-10-20 01:46:41 -0500 received badge  Famous Question (source)
2017-09-23 09:05:07 -0500 marked best answer How to used ROS_CANopen?

Hi. I am quite new to ROS . I want to use ros_canopen package to communicate with the robot in my lab, i.e. build a ros controller for it. However , I cant find a more detail tutorial to use it than the general intro on wiki.org .

HardWare and resources:

  1. A USB-to-CAN compact is used to communicate between my laptop and the robot . This USB-to-CAN provids a Linux driver called ECI and an EDS file for configuring CANopen devices.
  2. The robot uses Maxon motors and Copley driver boards(Accelnet Micro Module). Copley provides a Copley Motion Lib(CML).

ros_canopen seems only support socketcan![](http://wiki.ros.org/ros_canopen?

How can I set up my laptop to communicate with CAN bus. I use Ubuntu 14.04 with Indigo installed.

Many thanks.

2017-09-23 08:11:23 -0500 received badge  Nice Question (source)
2017-09-23 07:16:15 -0500 marked best answer No known controllers and their joints in MoveIt! when connecting real robot.

Hi, I was setting up MoveIt! for my robot, which uses ros_canopen as its driver. I used moveit_setup_assistant to generate the moveit_config package and follow this tutorial to configure MoveIt! to talk to the real robot.

Rostopic list shows that the FollowJointTrajectory action on the server side(robot driver) is ready:

/joint_trajectory_controller/command
/joint_trajectory_controller/follow_joint_trajectory/cancel
/joint_trajectory_controller/follow_joint_trajectory/feedback
/joint_trajectory_controller/follow_joint_trajectory/goal
/joint_trajectory_controller/follow_joint_trajectory/result
/joint_trajectory_controller/follow_joint_trajectory/status
/joint_trajectory_controller/state

My controller.yaml for the MoveIt side is

controller_list:  
 - name:  joint_trajectory_controller 
   action_ns: follow_joint_trajectory
   type: FollowJointTrajectory
   default: true
   joints: 
     - I1_Joint
     - T2_Joint
     - T3_Joint
     - i4_Joint
     - t5_Joint

When I clicked the execute button in rviz, errors showed up:

[ERROR]: Unable to identify any set of controllers that can actuate the specified joints: [ I1_Joint T2_Joint T3_Joint i4_Joint t5_Joint ]
[ERROR] : Known controllers and their joints:
[ERROR] : Apparently trajectory initialization failed

The moveit_controller_manager.launch starts the moveit side for the system. I use Indigo and Ubuntu14.04.

Any help will be much appreciated.

2017-09-13 19:36:43 -0500 marked best answer ROS_CANopen can't start velocity_controller and trajectory_controller

Hi, I am working with ros_canopen to control a robot arm. The arm uses Copley drives. Please check out the github repo that I'm working on here.

  1. The position controller (point to point move) works fine now. A littile problem here is I don't know how to specify the speed during the point-to-point move.

  2. When I tried to start the velocity_controller:

    rosrun controller_manager controller_manager start I_Joint_velocity_controller
    

    errors would show up:

    [ERROR]: I_Jointcould not enter mode 2
    [ERROR]: Could not switch one joint for I_Joint_velocity_controller, will stop all related joints and the controller.
    [ERROR]: I_Joint is not ready to switch mode
    [ERROR]: Could not switch controllers. The hardware interface combination for the requested controllers is unfeasible.
    

    and if I start the trajectory_controller:

    rosrun controller_manager controller_manager start joint_trajectory_controller
    

    errors would be:

    abort60c1#1, reason: Invalid value for parameter (download only).
    Could not process message
    
    [ERROR]: RPDO timeout; RPDO timeout;ros_canopen/canopen_master/src/sdo.cpp(429): Throw in function void canopen::SDOClient::transmitAndWait(const canopen::ObjectDict::Entry&, const canopen::String&, canopen::String*)
    Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<canopen::TimeoutException> >
    std::exception::what: SDO
    [canopen::tag_objectdict_key*] = 60c1sub1
    

Are these problems caused by wrong configuration of my dcf file? I mapped the PDOs according to the Copley programming manual p. 25

Many thanks.

2017-09-12 02:51:32 -0500 received badge  Famous Question (source)
2017-09-06 23:19:24 -0500 received badge  Favorite Question (source)
2017-08-16 03:08:02 -0500 received badge  Notable Question (source)
2017-07-18 07:03:13 -0500 received badge  Famous Question (source)
2017-04-10 22:31:32 -0500 commented question How to launch a roslaunch in Qt with a terminal (GUI) ?

Roslaunch provides Python API (Example). One possible solution is to call roslaunch Python API from cpp(call Python from cpp).

2017-03-19 21:16:00 -0500 received badge  Famous Question (source)
2017-01-23 14:02:40 -0500 received badge  Necromancer (source)
2017-01-06 08:16:07 -0500 commented question ar_track_alvar mistake on id

The size of the tag and camera resolution matter.

I used tag in size of 4cm and the id recognition is terrible. I have tried Xtion and primesense Carmine and the resolution is not enough for such small tag. Right now I'm trying to calibrate my Kinect2 to do the job.

2017-01-03 10:28:35 -0500 received badge  Notable Question (source)
2017-01-01 09:42:35 -0500 answered a question tf::poseKDLToMSG throwing errors

Try add find_package(kdl_conversions).

2016-12-31 03:02:13 -0500 received badge  Notable Question (source)
2016-12-31 03:01:45 -0500 commented answer ros_canopen dcf_overlay setting

Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::bad_cast> > std::exception::what: std::bad_cast [canopen::tag_objectdict_key*] = 60c1sub1

2016-12-31 02:56:20 -0500 commented answer ros_canopen dcf_overlay setting

You are right. I used the Schunk DCF because the Copley eds was faulty. I use a modified Copley eds now, and initialization produces:

[ERROR]:canopen_master/src/pdo.cpp(372): Throw in function void canopen::PDOMapper::Buffer::write(const canopen::ObjectDict::Entry&, const canopen::String&)
2016-12-30 08:31:20 -0500 received badge  Popular Question (source)
2016-12-30 07:59:26 -0500 commented answer ros_canopen dcf_overlay setting

candump showed

can0  TX - -  601   [8]  23 C1 60 01 00 00 00 00
can0  RX - -  581   [8]  80 C1 60 01 30 00 09 06
2016-12-30 07:34:11 -0500 commented answer ros_canopen dcf_overlay setting

Thank you. Now I've changed the PDO mappings(github.com/Linkeway/BIRL_modular_robot/blob/master/birl_module_canopen/config/manipulator5d_motors.yaml).abort60c1#1, reason: Invalid value for parameter (download only) showed up during initialization. I set DefaultValue for 60c1#1 in dcf. No luck.

2016-12-30 02:46:30 -0500 received badge  Associate Editor (source)
2016-12-30 02:29:29 -0500 asked a question ros_canopen dcf_overlay setting

Hi,

I'm using ros_canopen to control my robot.

The joint_position_controller works but I get stuck with joint_trajectory_controller. I set PDO mapping through dcf_overlay :

dcf_overlay:
    "1600sub0": "2"
    "1600sub1": "0x60400010" # map Control Word to RPDO1
    "1600sub2": "0x60c10120" # map 60c1sub2(position for PVT mode) to RPDO1
    "1601sub0": "2"
    "1601sub1": "0x60400010" # map Control Word to RPDO2
    "1601sub2": "0x60600008" # map 0x6060(mode of operation) to RPDO2
    "60c0": "0x0000" # map Interpolation submode 0:Linear interpolation with constant time

The candump message confused me because:

$ candump can0 -dcex |grep 201 # candump RPDO1
   can0  TX - -  201   [6]  04 00 AA 32 00 00
$ candump can0 -dcex |grep 301 # candump RPDO2
   can0  TX - -  301   [3]  1F 01 07 # halt the drive?
   can0  TX - -  301   [3]  1F 00 07
   can0  TX - -  301   [3]  1F 01 07  # halt the drive?
   can0  TX - -  301   [3]  1F 00 07
   ...

1.How come the first two bytes of the RPDO1 message differ with that of RPDO2 since they both are mapped to control word?

2.$ candump can0 -dcex |grep 201 showed that the position data were successfully sent to CAN bus. But the robot didn't move. Control word 1F 01 seems to be halting the drive and indicates the operation mode is profile position mode(see Copley Manual P58). Is it a problem?

Thank you in advance.

2016-12-29 06:21:19 -0500 received badge  Famous Question (source)
2016-12-29 05:22:55 -0500 edited question canopen_motor_node doesn't with dcf configuration

Hi,

I have successfully used ros_canopen to talk to my robot through position_controller. However, I failed to use joint_trajectory_controller(PVT operation mode) which involves PDO communication.

candump showed that RPDO2 data on the CAN bus:

can0  TX - -  301   [6]  1F 00 61 F1 FF FF

According to the dcf file I used to configure canopen_motor_node, RPDO2 is mapped to 0x6040(16bit) and 0x6060(8bit). So COB-id 301 should be transmitting 24 bits. Is it a problem from the dcf interpreter?

For your reference, I use Copley drive so I am configuring PDOs on the canopen_motor_node side according to the Copley Manual(see p25).

I'm using indigo and Ubuntu14.04.

Any help will be much appreciated.