[choreonoid-users 00015] Re: Does it support Force Sensor?

Shin'ichiro Nakaoka s.nakaoka at aist.go.jp
Fri Nov 8 19:34:24 JST 2013


Hi Luis,

> I will send you de model tomorrow. It is at the lab computer. It is
> basically the SR1 model with no chest, arms and head. I added the force
> sensor as it is at the HRP-4C model.

Thank you for this.
I tried to load your modified model and confirmed that Choreonoid
crashes, and I have found a bug causing this problem.

By applying the following modification, the bug is fixed:

--- a/src/Body/Device.h
+++ b/src/Body/Device.h
@@ -143,7 +143,7 @@
                 if(TargetType* device = dynamic_cast<TargetType*>(get(i))){
                     const int id = device->id();
                     if(id >= 0){
-                        if(out_map.size() >= id){
+                        if(out_map.size() <= id){
                             out_map.resize(id + 1);
                         }
                         out_map[id] = device;

I'm sorry to trouble you,
and thank you so much for pointing out this problem.

-- 
Shin'ichiro Nakaoka <s.nakaoka �� aist.go.jp>


More information about the choreonoid-users mailing list